Find the answer to your Linux question:
Results 1 to 6 of 6
Ok, I am a bit of a newb, so go easy on me. I have a somewhat complicated network setup that I am testing on an internal network. So any ...
  1. #1
    Just Joined!
    Join Date
    Aug 2010
    Posts
    2

    [SOLVED] 2 NICs, cannot connect to host attached to 2nd NIC

    Ok, I am a bit of a newb, so go easy on me. I have a somewhat complicated network setup that I am testing on an internal network. So any help would be appreciated.

    I have the following route setup:

    PC Client (192.168.2.100) --> Router (192.168.2.1) --> DSLAM (on our internal network) --> PPPOE Server (192.168.9.1) on Linux Ubuntu 8.04 on interface card eth2.

    On the same Linux Ubuntu Machine on interface card eth1 (static IP 192.168.5.100), I have an Asterisk SIP server plugged into it. SIP Server = 192.168.5.101 (static)

    I need the PC client (192.168.2.100) to register via SIP soft phone to register on the SIP server (192.168.5.101). From the PC client I can ping as far as the eth1 interface (192.168.5.100)...but cannot ping the SIP Server (.101).

    From the SIP server (192.156.5.101)...I can ping 192.168.5.100, I can ping 169.254.5.228 (Eth2:avahi), but not sure what that is. I cannot ping the pppoe default gateway (192.168.9.1), which I think you cannot anyway.

    No firewalls are running. My IPtables I cleaned out totally. I think it might be as simple as a route add, but I really have no clue. Tried building a virtual bridge using brctl LINUX betweeh eth1 and eth2, but that made things worse (could not ping anything after that)


    Route table:

    Destination Gateway Genmask Flags Metric Ref Use Iface

    192.168.9.100 * 255.255.255.255 UH 0 0 0 ppp0
    192.168.5.0 * 255.255.255.0 U 0 0 0 eth1
    link-local * 255.255.0.0 U 0 0 0 eth2
    link-local * 255.255.0.0 U 1000 0 0 eth1
    default * 0.0.0.0 U 1000 0 0 eth2


    Ifconfig:


    eth1 Link encap:Ethernet HWaddr 00:04:75:9d:e0:5e
    inet addr:192.168.5.100 Bcast:192.168.5.255 Mask:255.255.255.0
    inet6 addr: fe80::204:75ff:fe9d:e05e/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:342 errors:0 dropped:0 overruns:0 frame:0
    TX packets:388 errors:0 dropped:0 overruns:0 carrier:0
    collisions:72 txqueuelen:1000
    RX bytes:251766 (245.8 KB) TX bytes:70778 (69.1 KB)
    Interrupt:9 Base address:0x2000


    eth2 Link encap:Ethernet HWaddr 00:01:02:a7:9a:4d
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:2530 errors:0 dropped:0 overruns:0 frame:0
    TX packets:120 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:214935 (209.8 KB) TX bytes:9740 (9.5 KB)
    Interrupt:5 Base address:0x6000


    eth2:avahi Link encap:Ethernet HWaddr 00:01:02:a7:9a:4d
    inet addr:169.254.5.228 Bcast:169.254.255.255 Mask:255.255.0.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    Interrupt:5 Base address:0x6000


    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:3596 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3596 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:179800 (175.5 KB) TX bytes:179800 (175.5 KB)


    ppp0 Link encap:Point-to-Point Protocol
    inet addr:192.168.9.1 P-t-P:192.168.9.100 Mask:255.255.255.255
    UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
    RX packets:2429 errors:0 dropped:0 overruns:0 frame:0
    TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:3
    RX bytes:155317 (151.6 KB) TX bytes:1784 (1.7 KB)



    I do not understand why I cannot ping 192.168.5.100, but not .101
    I have opened the Asterisk Sip Server to accept connections from 192.168.2.0, 192.168.5.0, and 192.168.9.0 subnets.


    Any help would be appreciated.

  2. #2
    RDU
    RDU is offline
    Just Joined!
    Join Date
    Aug 2010
    Posts
    89
    Have you defined 192.168.5.100 as the default gateway on your asterick server ? (or a least defined a route to 192.168.2.0/24 to 192.168.5.100 ?)

  3. #3
    Just Joined!
    Join Date
    May 2009
    Posts
    4
    A 169 type address is typically that given to a system setup for DHCP, that cannot find the DHCP server. (169.254.5.228 (Eth2:avahi),)

    While they would be able to ping each other, it probably would not have a route associated.

    I may be reading this wrong.

  4. #4
    Linux Enthusiast Mudgen's Avatar
    Join Date
    Feb 2007
    Location
    Virginia
    Posts
    623
    You need to turn on IP forwarding on the Ubuntu box. Try
    sysctl -w net.ipv4.ip_forward=1
    to turn it on on the fly. If that takes care of it, set it persistently in /etc/sysctl.conf:
    net.ipv4.ip_forward = 1

    The 169.254 thing is a red herring, it's the link-local address and doesn't mean anything to you in this context.

  5. #5
    Just Joined!
    Join Date
    Feb 2009
    Posts
    22
    as greyhairweenie as described enabling ip forwarding on your Ubuntu box should be sufficient. Also, Just make sure that on your SIP server there is a default route set.

    Even if that doesn't solves the issue, try sniffing the packets on your ubuntu box and execute a ping 192.168.5.101 from 192.168.2.100. Do a stepwise sniffing like:
    1. sniff first on eth2 to make sure that the packet reaches eth2 of ubuntu.
    2. if step 1 is ok, sniff now on eth1 of ubuntu and make sure that the packet are forwarded to eth1. If you do not see packets on this interface, your
    IP-forwarding is not yet enabled.
    3. with step 2 confirmed, sniff on your sip-server box interface and see that the packets are reaching and are returned back too. Incase they are not returned back, add a default route to 192.168.5.100.

  6. #6
    Just Joined!
    Join Date
    Aug 2010
    Posts
    2

    Thank you

    I just want thank you for all your responses. RDU pointed out the obvious to me which I should have checked a long time ago. It was the gateway on the SIP server which was not setup correctly. I was totally focused on the client not being able to reach the server (I could ping from the interfaces, but not the client) without thinking whether the SIP server could talk back.

    I knew I had IP forwarding setup correctly because I only did it about 50x over the last days pulling my hair out .

    Anyway...problem solved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...