Getting DHCP, IP aliasing and IP forwarding to work together...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I can't get my laptops to connect to the outside world, although they
reach their DHCP server just fine. 

I've not comprehended some facet or I must not haven't done something
(properly), but for the life of me I don't know what it could be.
Googling around has been helpful in getting to this point, but I'm
missing something. Your help is appreciated.

Here's where I am currently.

Two laptops, the DHCP server, some other machines and a DSL modem are all
connected to a 10/100 Mb Ethernet hub with the following IP addresses:

   network:    64.166.134.112  
   netmask:    255.255.255.248
   DHCPserver: 64.166.134.117  (RH9)
   DSLmodem:   64.166.134.118

   network:    192.168.10.0  
   netmask:    255.255.255.0
   laptop1:    192.168.10.109 (RH9)
   laptop2:    192.168.10.127 (WinXP)

I set up the DHCP server's routing table with three commands in /etc/rc.local: 

   ifconfig eth0:1 192.168.10.1
   route add -host 192.168.10.1 eth0:1
   route add -net  192.168.10.0 netmask 255.255.255.0 eth0:1

which gives this routing table:

   Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
   64.166.134.117  0.0.0.0         255.255.255.255 UH    0      0        0 eth0
   192.168.10.1    0.0.0.0         255.255.255.255 UH    0      0        0 eth0
   64.166.134.112  0.0.0.0         255.255.255.248 U     0      0        0 eth0
   192.168.10.0    64.166.134.117  255.255.255.0   UG    0      0        0 eth0
   169.254.0.0     0.0.0.0         255.255.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         64.166.134.118  0.0.0.0         UG    0      0        0 eth0

The DHCP server's Ethernet network interface:

   eth0      Link encap:Ethernet  HWaddr 00:E0:18:05:A9:68  
             inet addr:64.166.134.117 Bcast:64.166.134.119  Mask:255.255.255.248
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
             RX packets:440089 errors:0 dropped:0 overruns:0 frame:0
             TX packets:409012 errors:0 dropped:0 overruns:1 carrier:0
             collisions:0 txqueuelen:100 
             RX bytes:272871106 (260.2 Mb)  TX bytes:94124015 (89.7 Mb)
             Interrupt:10 Base address:0xa800 Memory:ee800000-ee800038 

   eth0:1    Link encap:Ethernet  HWaddr 00:E0:18:05:A9:68  
             inet addr:192.168.10.1  Bcast:192.168.10.255  Mask:255.255.255.0
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
             RX packets:440089 errors:0 dropped:0 overruns:0 frame:0
             TX packets:409012 errors:0 dropped:0 overruns:1 carrier:0
             collisions:0 txqueuelen:100 
             RX bytes:272871106 (260.2 Mb)  TX bytes:94124015 (89.7 Mb)
             Interrupt:10 Base address:0xa800 Memory:ee800000-ee800038 

and IP forwarding is turned on:

   # sysctl net.ipv4.ip_forward
   net.ipv4.ip_forward = 1

DHCP is setup thusly (/etc/dhcpd.conf):

   default-lease-time 600;
   max-lease-time 7200;
   option subnet-mask 255.255.255.0;
   option broadcast-address 192.168.10.255;
   option routers 192.168.10.1;
   option domain-name-servers 64.166.134.117, 206.13.12.28, 206.13.31.12;
   option domain-name "leonora.org";
   ddns-update-style ad-hoc;

   subnet 192.168.10.0 netmask 255.255.255.0 {
      range 192.168.10.2 192.168.10.254;
      host laptop1 {
        hardware ethernet 00:0b:db:1b:ca:5a;
        fixed-address 192.168.10.109;
      }
      host laptop2 {
        hardware ethernet 00:10:a4:03:dc:45;
        fixed-address 192.168.10.127;
      }
   }

I've entered the necessary mumbo-jumbo for iptables to work with my new
eth0:1 interface, but I get the same behavior (no access from laptops
to the Internet) even if I turn iptables off.

Concentrating on laptop1, the Linux laptop, for the moment... The last
entry in laptop1's dhcp lease looks like this:

   lease {
     interface "eth0";
     fixed-address 192.168.10.109;
     option subnet-mask 255.255.255.0;
     option routers 192.168.10.1;
     option dhcp-lease-time 600;
     option dhcp-message-type 5;
     option domain-name-servers 64.166.134.117,206.13.12.28,206.13.31.12;
     option dhcp-server-identifier 64.166.134.117;
     option broadcast-address 192.168.10.255;
     option domain-name "leonora.org";
     renew 0 2003/11/9 19:22:16;
     rebind 0 2003/11/9 19:26:27;
     expire 0 2003/11/9 19:27:42;
   }

Its Ethernet interface is:

   eth0      Link encap:Ethernet  HWaddr 00:0B:DB:1B:CA:5A  
             inet addr:192.168.10.109  Bcast:192.168.10.255  Mask:255.255.255.0
             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
             RX packets:128741 errors:0 dropped:0 overruns:0 frame:0
             TX packets:228979 errors:0 dropped:0 overruns:0 carrier:2
             collisions:0 txqueuelen:100 
             RX bytes:10101993 (9.6 Mb)  TX bytes:287682017 (274.3 Mb)
             Interrupt:10 Memory:e0100000-e0101080 

and its routing table is:

   Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
   192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
   169.254.0.0     0.0.0.0         255.255.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         192.168.10.1    0.0.0.0         UG    0      0        0 eth0

Hmmm. no host entry, but adding one with

   route add -host 192.168.10.109 eth0

didn't change any behavior I could detect.

So, everything looks OK to me and I've exhausted my knowledge. Any suggestions?

--- Vladimir

------------------------------------------------------------------------
Vladimir G. Ivanovic                        http://leonora.org/~vladimir
2770 Cowper St.                                         vladimir@xxxxxxx
Palo Alto, CA 94306-2447                                 +1 650 678 8014


-- 
Shrike-list mailing list
Shrike-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/shrike-list

[Index of Archives]     [Fedora Users]     [Centos Users]     [Kernel Development]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat Phoebe Beta]     [Yosemite Forum]     [Fedora Discussion]     [Gimp]     [Stuff]     [Yosemite News]

  Powered by Linux