+ Post New Thread
Results 1 to 10 of 10
*nix Thread, another routing question in Technical; Ive got a gentoo box that has multiple NICs, on a network that has both WAN and LAN IPs. The ...
  1. #1

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,527
    Thank Post
    1,339
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200

    another routing question

    Ive got a gentoo box that has multiple NICs, on a network that has both WAN and LAN IPs.

    The gentoo box has 2 WAN (81.x.x.x) and 1 LAN ip (192.168.2.x) IP. These are all connected through the same switch and theres also the adsl modem/router plugged into the switch as well.

    From any LAN workstation, I can ping the 81.x.x.x IPs fine on the gentoo box when i take down the 192.168.2.x interface, however when its up i cant get them to talk.

    Anyone know the correct syntax for the 'route add' statement I need to get this working?

  2. #2

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    Enable IP Forwarding.

  3. #3

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,527
    Thank Post
    1,339
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    ardvue ~ # cat /proc/sys/net/ipv4/ip_forward
    1
    It is ?

  4. #4

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    hmm ok. Can you post the results of 'ifconfig' and 'route' please?

  5. #5

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,527
    Thank Post
    1,339
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    Code:
    eth3      Link encap:Ethernet  HWaddr 00:1B:21:0A:B7:6E
              inet addr:192.168.2.4  Bcast:192.168.2.255  Mask:255.255.255.0
              inet6 addr: fe80::21b:21ff:fe0a:b76e/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:14911615 errors:0 dropped:0 overruns:0 frame:0
              TX packets:19968310 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:1736570850 (1656.1 Mb)  TX bytes:2058540052 (1963.1 Mb)
              Base address:0xd800 Memory:ed800000-ed820000
    
    eth4      Link encap:Ethernet  HWaddr 00:40:F4:70:D6:11
              inet addr:81.123.58.218  Bcast:81.123.58.223  Mask:255.255.255.248
              inet6 addr: fe80::240:f4ff:fe70:d611/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:2312227 errors:0 dropped:0 overruns:0 frame:0
              TX packets:416997 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:776135799 (740.1 Mb)  TX bytes:45895521 (43.7 Mb)
              Interrupt:10 Base address:0xe000
    Code:
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    81.123.58.216   0.0.0.0         255.255.255.248 U     0      0        0 eth4
    192.168.2.0     0.0.0.0         255.255.255.0   U     0      0        0 eth3
    127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
    0.0.0.0         81.123.58.222   0.0.0.0         UG    0      0        0 eth4
    i dont have iptables installed or configured if that makes any difference?
    Last edited by RabbieBurns; 13th May 2008 at 11:47 AM.

  6. #6

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    Your routing looks fine. What are the network settings of your client machines?

  7. #7

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,527
    Thank Post
    1,339
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    they get a 192.168.2.x ip dished up from dhcp running on another gentoo box with the same setup (wan and lan IPs) and the DNS is set to the LAN ips of each of the 2 gentoos, and default gateway is the 192.168.2.1 interface on the adsl modem/router

  8. #8

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    ok, what exactly are you trying to do here? As there's nothing wrong with that setup. Do you need the LAN clients to be able to access the WAN? If so you'll have to NAT (or is your DSL router doing that?)

  9. #9

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,527
    Thank Post
    1,339
    Thanked 470 Times in 307 Posts
    Blog Entries
    6
    Rep Power
    200
    yeh i need the lan clients to be able to access the wan IPs - which works - there is no problem accessing the wan IPs on devices with just the WAN ips, its the machines with both a wan and a lan IP that the problem is). NAT etc is all fine. As soon as i bring down the 192.blah interface on a box i can then ping the WAN ips of that box fine. As soon as the 192.blah interface is back up, no ping replies.

  10. #10

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    Ok, to make this work you must alter the routing on your default gateway (the DSL router) so that it knows that 81.x.x.x addresses are internal.

SHARE:
+ Post New Thread

Similar Threads

  1. Ubuntu Routing
    By jimothy in forum *nix
    Replies: 13
    Last Post: 10th May 2008, 03:51 PM
  2. Exchange message routing - or not!
    By ajbritton in forum Windows
    Replies: 2
    Last Post: 24th May 2007, 08:08 AM
  3. VPN routing stuff
    By nicholab in forum Wireless Networks
    Replies: 1
    Last Post: 30th March 2007, 08:34 AM
  4. Dumb (?) Routing Question
    By ANiceEnglishman in forum Wireless Networks
    Replies: 5
    Last Post: 26th May 2006, 12:04 PM
  5. Routing emails in W2K
    By openhgs in forum Windows
    Replies: 5
    Last Post: 26th April 2006, 01:27 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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