Completely Different range of IPs obtained from Dhcp server
Currently I am facing a strange problem.
- If I connect my windows laptop to internet(ethernet), it happily gets an ip, gateway, dns etc through dhcp and works fine. These are the values fetched:
IP Address: 18.104.22.168
Subnet Mask: 255.255.254.0
Default Gateway: 22.214.171.124
DNS Servers: 126.96.36.199, 188.8.131.52
- When I try to connect my linux deskop to the internet, it gets a complete different set of ip, gateway etc. and I am also not able to access internet. I am completely lost for any logical reason.
Can somebody please explain?
I am listing some info that I collected from linux machine
The values obtained are:
eth0 Link encap:Ethernet HWaddr 00:16:36:57:6C:A2
inet addr:10.10.0.247 Bcast:10.10.1.255 Mask:255.255.254.0
inet6 addr: fe80::216:36ff:fe57:6ca2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:143048 errors:0 dropped:0 overruns:0 frame:0
TX packets:420 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:15166544 (14.4 MiB) TX bytes:46409 (45.3 KiB)
Interrupt:17 Base address:0xe000
The set of dns addresses are same (as those obtained for windows).
Even from this 10.* range of address, I am able to ping Gateway obtained for windows configuration (184.108.40.206).
[root@farfaraway debug]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.0.0 * 255.255.254.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 wlan0
192.168.0.0 * 255.255.0.0 U 0 0 0 wlan0
default 10.10.0.1 0.0.0.0 UG 0 0 0 eth0
[root@farfaraway debug]# traceroute 220.127.116.11
traceroute to 18.104.22.168 (22.214.171.124), 30 hops max, 40 byte packets
1 (126.96.36.199) 0.866 ms 0.936 ms 1.052 ms
tethereal -i eth0
206.350249 QuantaCo_f9:23:5f -> Broadcast ARP Who has 188.8.131.52? Tell 184.108.40.206
206.416877 QuantaCo_f9:23:5f -> Broadcast ARP Who has 220.127.116.11? Tell 18.104.22.168
206.430226 QuantaCo_f9:23:5f -> Broadcast ARP Who has 22.214.171.124? Tell 126.96.36.199
206.464941 CiscoLin_e8:37:21 -> Broadcast ARP Who has 10.10.128.1? Tell 10.10.128.44
206.513564 QuantaCo_f9:23:5f -> Broadcast ARP Who has 188.8.131.52? Tell 184.108.40.206
206.607127 QuantaCo_f9:23:5f -> Broadcast ARP Who has 220.127.116.11? Tell 18.104.22.168
From the tethereal output, it is pretty much visible, that machine can see packets on 10.10.* and 77.222.* n/w.
I really want to get the internet working on my machine, but clueless as of know. Can somebody please provide some pointers?
Let me know, in case my description is not clear and more information may be required.
BTW, I tried looking for old cached ip information in /etc (just to check if this 10.10.* is picked up from there and not from dhcp), but it's not there.
What is your dhcp server? Is it your router or something else?
Frankly speaking, I don't know. I have just rented an apartment and they have this ethernet socket available in the wall :).
Basically, I don't have any control or information about the dhcp server side. Its a black box for me.
Still stuck and not able to solve this problem.
But I got some additional information. May be some networking guru can see some pattern :).
--- On Windows ----
C:\Documents and Settings\Administrator>arp -a 22.214.171.124
Interface: 126.96.36.199 --- 0x2
Internet Address Physical Address Type
188.8.131.52 00-16-36-f9-23-5f static
---- On Linux ----
[root@farfaraway ~]#arp 10.10.0.1
Address HWtype HWaddress Flags Mask Iface
10.10.0.1 ether 00:16:36:F9:23:5F C eth0
Basically, the 'mac address' of gateway I obtain on both the machines is same (though ips are different).
Still looking for some expert advice :(.
I have had this problem happen to me.. it is not your linux machine but rather the modem. For some reason my modem will not give me access to the internet if I just switch machines. What you need to do is plug your desktop and power off the modem for a few seconds, turn it back on and it will resend your mac over to the dhcp server.
the best solution is to get a router so you don't have to do this procedure constantly every time that you switch machines.
Let me know if it works!
When you first connected to the Ethernet port with your PC, did you have to use a browser to configure your network ?
I'm thinking their network may be running a Captive Portal, where you have to sign-on via browser, and once signed-on, you get a new/usable IP address.
Ok, just a thought.
Its no surprise the MAC addresses of the gateway device are the same - the wire goes to the same place regardless of which machine you plug into the jack.
Some intelligent switches (with some layer 3 capabilities) and routers can be configured to allow only a single MAC address during the span of a DHCP lease or other period. Your PC gets a public (usable) IP address, while you get an RFC 1918 (private) IP address otherwise. It seems like you're getting put on a VLAN under these circumstances.
Get the MAC address of your PC, and spoof your Linux system's Ethernet MAC address to the same as the PC, and try to obtain a lease after that.
This may be a simple programming problem with their switch/router, or could be a security configuration they've employed.
Your thought made my day (actually night, its 3am :).
Spoofing the MAC worked.
For others, I used this simple linux command for spoofing
$ifconfig eth0 hw ether <False Mac address>
Now I really need to check how they assign this lease (May be its' related to when somebody occupies this apartment ;)
Excellent. I thought it would. I think it is clear what they are doing.
Place a NATing router between the port and your systems. Then, it presents itself as one MAC address, giving you the ability to use multiple systems.
Those little NAT routers are cheap, and they provide an excellent layer of security between your system and the internet.
Why trust that the apartment complex router is secure? It is unlikely that it is.
As of know, I just want to work on setting my linux machine as the host for Internet connection sharing (ICS). The only other machine in the n/w (sharing this internet connection) will be running windows.
|All times are GMT -5. The time now is 03:09 AM.|