Find the answer to your Linux question:
Results 1 to 6 of 6
Hi guys I have a problem with eth1 on my linux box. It allways fails to determen IP address. the NIC it self is working properly even if I run ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2005
    Posts
    20

    pls help with 2 NICs on rh8


    Hi guys

    I have a problem with eth1 on my linux box. It allways fails to determen IP address. the NIC it self is working properly even if I run adsl-setup it connects to my ISP but it looks like there is no link between eth0 and eth1.
    eth0 is working and dhcp server also works on eth0. I made default route to gw and route to 255.255.255.255 also I put these lines:

    # iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
    and
    # iptables -t nat -A PREROUTING -i eth1 -j DNAT --to 5.6.7.8-5.6.7.10

    I would be very thankfull for your help. when I installed rh with 2 NICs did it have to be done automaticly or still I have to put some routes or iptables stuff?

  2. #2
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    What exactly are you trying to do? Are you using this box as a router with NAT?
    The best things in life are free.

  3. #3
    Just Joined!
    Join Date
    Jan 2005
    Posts
    20
    yes, I`m trying to make a router with NAT, dhcp server on eth0 ant ppp on eth1 with dynamic IP. Finaly I made my eth1 work after I put static addr in /etc/sysconfig/network-scripts/ifcfg-eth1 , but there is not link between eth0 and eth1, how do I make all the routes and other stuff needed to make it work ?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    Yes, I was going to say that you need to have have eth1 as static.

    To make the routes work, leave the entry for the default gateway empty on eth1.

    Then try running the route command to see if it's working OK. If you have problems, post use the route command and post the output here using the quote tags.
    The best things in life are free.

  6. #5
    Just Joined!
    Join Date
    Jan 2005
    Posts
    20
    I`m allmost there. Now I have made changes as you said and now I can connect to internet from my linux box through lynx as before I couldn`t.
    After I type route -n I get :

    Destination Gateway Genmask Flags Metric Ref Use Iface
    82.135.143.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
    10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0
    127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
    0.0.0.0 82.135.143.1 0.0.0.0 UG 0 0 0 ppp0

    because I have already working router I see only one difference , above it has line :
    Destination Gateway Genmask Flags Metric Ref Use Iface
    255.255.255.255 0.0.0.0 255.255.255.255 UH 0 0 0 eth1(my should be eth0 I supose) which probably allows to send packets out to my LAN . Am I close ? :)

  7. #6
    Just Joined!
    Join Date
    Jan 2005
    Posts
    20
    ups , sorry for the messy route table, it looked beter before I put it :lol:

Posting Permissions

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