LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-14-2010, 11:14 AM   #1
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Rep: Reputation: 234Reputation: 234Reputation: 234
kernel: dhcpcd segfault at...


I have two ThinkPads: T60 (let’s call it brightstar) and T40 (let’s call it shadystar). The main difference between them is lacking of WiFi and Bluetooth in weaker machine (shadystar). On both machines I installed Slackware 13.1. The configuration of both systems is almost the same. I installed Slackware on brightstar and after the configuration copied it to shadystar changing a few system files. Now I try to configure both these machines to work in LAN and WAN. To establish LAN and WAN access I use modem-router. Modem is connected to the analog phone line. Both machines are connected to the router via Ethernet cables.

On brightstar the local network starts during boot procedures. After logging to the system I can initialize Internet access using the command dhcpcd without any arguments.

On shadystar the local network starts during boot procedures too. Unfortunately I can’t initialize an Internet access on that machine.

I inspected log files looking for the messages stored during boot procedures:

/var/log/messages: # on brightstar
Code:
brightstar logger: /etc/rc.d/rc.inet1:  /sbin/ifconfig lo 127.0.0.1
brightstar logger: /etc/rc.d/rc.inet1:  /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
brightstar logger: /etc/rc.d/rc.inet1:  /sbin/ifconfig eth0 192.168.1.2 broadcast  netmask 
brightstar logger: /etc/rc.d/rc.inet1:  /sbin/dhcpcd -t 10  eth0:1
brightstar dhcpcd: version 5.2.2 starting
brightstar dhcpcd: eth0:1: waiting for carrier
brightstar kernel: e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
brightstar kernel: 0000:02:00.0: eth0: 10/100 speed: disabling TSO
/var/log/messages: # on shadystar
Code:
shadystar logger: /etc/rc.d/rc.inet1:  /sbin/ifconfig lo 127.0.0.1
shadystar logger: /etc/rc.d/rc.inet1:  /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
shadystar logger: /etc/rc.d/rc.inet1:  /sbin/ifconfig eth0 192.168.1.3 broadcast  netmask 
shadystar kernel: e100: eth0 NIC Link is Up 100 Mbps Full Duplex
shadystar logger: /etc/rc.d/rc.inet1:  /sbin/dhcpcd -t 10  eth0:1
shadystar dhcpcd: version 5.2.2 starting
shadystar dhcpcd: eth0:1: checking for 19.24.19.2
shadystar dhcpcd: eth0:1: using IPv4LL address 19.24.19.2
shadystar dhcpcd: forking to background
shadystar kernel: dhcpcd[1281]: segfault at ec ip 080499f5 sp bfc89b30 error 4 in dhcpcd[8048000+12000]
In the case of brightstar everything goes well. In the case of shadystar dhcpcd reports segfault (see: the last line).

Then I use dhcpcd commands on both machines to initialize the connection to Internet:

# dhcpcd # on brightstar
Code:
dhcpcd: version 5.2.2 starting
dhcpcd: eth0: broadcasting for a lease
dhcpcd: pan0: checking for 19.24.11.12
dhcpcd: wlan0: waiting for carrier
dhcpcd: eth0: offered 77.25.89.58 from 192.168.1.254
dhcpcd: eth0: acknowledged 77.25.89.58 from 192.168.1.254
dhcpcd: eth0: checking for 77.25.89.58
dhcpcd: pan0: using IPv4LL address 19.24.11.12
dhcpcd: forking to background
# dhcpcd # on shadystar
Code:
dhcpcd: version 5.2.2 starting
dhcpcd: eth0: checking for 19.24.12.15
dhcpcd: eth0: using IPv4LL address 19.24.12.15
dhcpcd: forking to background
In result I get an Internet access on brightstar but I’m unable to achieve it on shadystar.

I inspected log files once again:

/var/log/messages: # on brightstar
Code:
brightstar dhcpcd: version 5.2.2 starting
brightstar dhcpcd: eth0: broadcasting for a lease
brightstar dhcpcd: pan0: checking for 19.24.11.12
brightstar dhcpcd: wlan0: waiting for carrier
brightstar dhcpcd: eth0: offered 77.25.89.58 from 192.168.1.254
brightstar dhcpcd: eth0: acknowledged 77.25.89.58 from 192.168.1.254
brightstar dhcpcd: eth0: checking for 77.25.89.58
brightstar dhcpcd: pan0: using IPv4LL address 169.254.141.162
brightstar dhcpcd: forking to background
brightstar dhcpcd: eth0: leased 77.25.89.58 for 30 seconds
brightstar dhcpcd: pan0: broadcasting for a lease
brightstar dhcpcd: eth0: renewing lease of 77.25.89.58
brightstar dhcpcd: eth0: acknowledged 77.25.89.58 from 192.168.1.254
brightstar dhcpcd: eth0: leased 77.25.89.58 for 30 seconds
brightstar dhcpcd: eth0: renewing lease of 77.25.89.58
brightstar dhcpcd: eth0: acknowledged 77.25.89.58 from 192.168.1.254
brightstar dhcpcd: eth0: leased 77.25.89.58 for 30 seconds
brightstar dhcpcd: eth0: renewing lease of 77.25.89.58
brightstar dhcpcd: eth0: acknowledged 77.25.89.58 from 192.168.1.254
/var/log/messages: # on shadystar
Code:
shadystar dhcpcd: version 5.2.2 starting
shadystar dhcpcd: eth0: checking for 19.24.12.15
shadystar dhcpcd: eth0: using IPv4LL address 19.24.12.15
shadystar dhcpcd: forking to background
shadystar kernel: dhcpcd[1982]: segfault at ec ip 080499f5 sp bffa7000 error 4 in dhcpcd[8048000+12000]
First machine (brightstar) connects to Internet. It renews leasing infinitely. I asked about it in the thread dhcpcd: eth0: renewing lease and niknah calmed me down saying that this is probably harmless. So I assume brightstar works well.

Second machine (shadystar) doesn’t connect to Internet reporting segfault in dhcpcd.

I tried to find some help in Internet seeking for phrase “kernel: dhcpcd "segfault at" ip” in Google. It seems that error is very obscure. It was reported merely a few times. Someone reported it in the connection with dhcpcd 5.0.1 and then announced that the problem disappeared with dhcpcd 5.0.3. Someone else observed it when used wicd. At least two persons observed serial segfaults concerning a few programs: dhcpcd, date, login etc.

None of these situations is related to the mine. I use new dhcpcd 5.2.2. I don’t use wicd nor wireless connection. In my case the other programs work well. Moreover the same dhcpcd 5.2.2 from the same Slackware 13.1 in almost the same configuration installed on two very similar machines works in the case of the first and refuses to work in the case of the second.

My question is trivial: what I could do to get Internet access using the second machine (shadystar)?

The question is trivial but I fear it’ll be hard to find an answer.

Every help will be appreciated.
 
Old 10-15-2010, 09:21 AM   #2
emage
LQ Newbie
 
Registered: Apr 2009
Posts: 1

Rep: Reputation: 1
DHCP IP addresses

I'm not sure about the segfault, but it looks like dhcpcd is running later, so it may be self recovering.

Your DHCP address on brightstar looks like it was given out by your ISP. If that's the case, unless you paid extra for multiple IP addresses, their DHCP server won't respond to shadystar (an ISP I once used had to add my computer's MAC address for me to get an IP address). I think what you need to do is setuip your router as a NAT so that it gets the one address your ISP gives out and routes traffic to the appropriate machines. This also hides your machines from the rest of your ISP's customers who are on the same subnet...
 
1 members found this post helpful.
Old 10-16-2010, 09:40 AM   #3
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Original Poster
Rep: Reputation: 234Reputation: 234Reputation: 234
The solution

The present post is very long but very instructive at the same time. After some researches I solved most of my problems.

The only one problem I have to solve still is how to share an Internet address between my machines. I’ll try your tip emage as well as dr_agon’s tip from the complementary thread later. Anyway thank you for an advice and welcome in SlackBuilds.org LinuxQuestions.org, emage.

My first post caused a little misunderstanding. I didn’t try to connect to Internet both mentioned machines at the same time. I started the first machine (brightstar) when the second machine (shadystar) was off and connected brightstar to Internet successfully. Then I tried the reverse method (started shadystar when brightstar was off) but I couldn’t access Internet in spite of virtually the same configuration of the system on both these machines.

I started to inspect log files on shadystar and I discovered segfault error mentioned in the first post. So I supposed that error causes my problems. Then I downgraded dhcpcd from current 5.2.2 version to 3.2.3 version on shadystar. It helped me to get rid of the messages about segfault in dhcpcd but didn’t solved the problem with Internet access. I still couldn’t establish it on shadystar.

So I inspected log files on brightstar and discovered the same segfault error. That means dhcpcd error has nothing in common with my problems concerning Internet access. Mentioned error appears on both machines. One of them connects to Internet and the second one refuses to connect.

In such a situation I upgraded dhcpcd on shadystar from 3.2.3 to 5.2.2 version to have two identical systems back.

When dhcpcd was downgraded on shadystar I encountered an interesting error message:

/var/log/syslog: # on shadystar with old dhcpcd
Code:
Oct 16 04:09:41 shadystar dhcpcd[1266]: eth0:1: SO_SOBINDTODEVICE: No such device
.
.
.
Oct 16 04:09:57 shadystar dhcpcd[1267]: eth0:1: SO_SOBINDTODEVICE: No such device
Oct 16 04:10:27 shadystar last message repeated 2 times
Oct 16 04:11:27 shadystar last message repeated 4 times
I asked Google about “dhcpcd SO_SOBINDTODEVICE No such device” and it returned just three results! That’s very obscure error. The first link drove me to the solution. It helped me to solve my problems when I upgraded dhcpcd back. That error appears with the older version of dhcpcd. Downgrade of that package helped me to find the solution that works with the current version of dhcpcd.

First machine (brightstar)

Boot procedures

/var/log/messages:
Code:
Oct 16 11:30:56 brightstar logger: /etc/rc.d/rc.inet1:  /sbin/ifconfig lo 127.0.0.1
Oct 16 11:30:56 brightstar logger: /etc/rc.d/rc.inet1:  /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
Oct 16 11:30:57 brightstar logger: /etc/rc.d/rc.inet1:  /sbin/ifconfig eth0 192.168.1.2 broadcast  netmask 
Oct 16 11:30:57 brightstar logger: /etc/rc.d/rc.inet1:  /sbin/dhcpcd -t 10  eth0:1
Oct 16 11:30:57 brightstar dhcpcd: version 5.2.2 starting
Oct 16 11:30:58 brightstar dhcpcd: eth0:1: waiting for carrier
Oct 16 11:30:58 brightstar kernel: e1000e: eth0 NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
Oct 16 11:30:58 brightstar kernel: 0000:02:00.0: eth0: 10/100 speed: disabling TSO
/var/log/syslog:
Code:
Oct 16 11:31:08 brightstar dhcpcd: timed out
Oct 16 11:31:08 brightstar dhcpcd: allowing 8 seconds for IPv4LL timeout
Oct 16 11:31:16 brightstar dhcpcd: timed out
Testing interfaces (after boot)

# ifconfig
Code:
eth0      Link encap:Ethernet  HWaddr de:ad:ba:be:ab:ed  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: deaf:abbe:bade:dead:beef:feed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:434 (434.0 B)  TX bytes:468 (468.0 B)
          Memory:ee000000-ee020000 

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:82 errors:0 dropped:0 overruns:0 frame:0
          TX packets:82 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7204 (7.0 KiB)  TX bytes:7204 (7.0 KiB)

wlan0     Link encap:Ethernet  HWaddr de:ad:fa:ce:de:ed  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
# route
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
In the above example I have running local network on eth0 interface.

Running dhcpcd

Formerly to access Internet on brightstar I used dhcpcd without any arguments. Now that command become useless for some reason.

In the below output of dhcpcd, /var/log/messages, ifconfig and route there is among others pan0 interface. It’s related to Bluetooth. Because it appears when I try to connect to Internet I suspected it’s necessary to achieve Internet connection though my modem-router hasn’t Bluetooth device. In invalid eth0:1 interface and strange pan0 interface thread dr_agon helped me to solve that problem. That false interface has nothing common with the Internet connection. So don’t worry about it.

As I mentioned above in /var/log/messages appears dhcpcd segfault error message. It seems irrelevant when we talking about Internet connection. It appeared on both machines when first was able to connect to Internet and the second was unable to achieve it.

# dhcpcd
Code:
dhcpcd: version 5.2.2 starting
dhcpcd: eth0: checking for 19.24.13.10
dhcpcd: pan0: checking for 19.24.11.12
dhcpcd: wlan0: waiting for carrier
dhcpcd: pan0: using IPv4LL address 19.24.11.12
dhcpcd: forking to background
/var/log/messages:
Code:
Oct 16 11:38:47 brightstar dhcpcd: version 5.2.2 starting
Oct 16 11:38:47 brightstar dhcpcd: eth0: checking for 19.24.13.10
Oct 16 11:38:47 brightstar dhcpcd: pan0: checking for 19.24.11.12
Oct 16 11:38:47 brightstar dhcpcd: wlan0: waiting for carrier
Oct 16 11:38:52 brightstar dhcpcd: pan0: using IPv4LL address 19.24.11.12
Oct 16 11:38:52 brightstar dhcpcd: forking to background
Oct 16 11:38:52 brightstar dhcpcd: eth0: using IPv4LL address 19.24.13.10
Oct 16 11:38:53 brightstar kernel: dhcpcd[2304]: segfault at ec ip 080499f5 sp bf9c4960 error 4 in dhcpcd[8048000+12000]
Notice meaningless dhcpcd segfault error above.

/var/log/syslog:
Code:
Oct 16 11:38:53 brightstar dhcpcd: eth0: hardware address aa:bb:cc:dd:ee:ff claims 19.24.13.10
My Ethernet card on brightstar has de:ad:ba:be:ab:ed hardware address. In the message above it’s replaced by aa:bb:cc:dd:ee:ff virtual hardware address.

Testing interfaces (after dhcpcd)

# ifconfig
Code:
eth0      Link encap:Ethernet  HWaddr de:ad:ba:be:ab:ed  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: deaf:abbe:bade:dead:beef:feed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:892 (892.0 B)  TX bytes:818 (818.0 B)
          Memory:ee000000-ee020000 

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:85 errors:0 dropped:0 overruns:0 frame:0
          TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7360 (7.1 KiB)  TX bytes:7360 (7.1 KiB)

pan0      Link encap:Ethernet  HWaddr ce:de:be:ad:ca:fe  
          inet addr:19.24.11.12  Bcast:19.24.255.255  Mask:255.255.0.0
          inet6 addr: cafe:babe:bade:deaf:abbe:face/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:636 (636.0 B)

wlan0     Link encap:Ethernet  HWaddr de:ad:fa:ce:de:ed  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
Notice meaningless pan0 interface above.

# route
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth0
19.24.0.0     *               255.255.0.0     U     202    0        0 eth0
19.24.0.0     *               255.255.0.0     U     204    0        0 pan0
loopback        *               255.0.0.0       U     0      0        0 lo
In the above example I still have running local network on eth0 interface but dhcpcd was unable to establish Internet connection.

Running dhcpcd with an alias

And now a bit of magic!

My Ethernet card has de:ad:ba:be:ab:ed hardware address. In the above case eth0 interface is used by local network. So let’s try to establish Internet connection on an alias.

To do it we take de:ad:ba:be:ab:ed hardware address, we precede it with 01 and add 1 to the number. The result looks like 01:de:ad:ba:be:ab:ee (01 at the beginning and ee instead of ed at the end). That’s the address of eth0:1 virtual interface. Now we run the dhcpcd command with parameters (warning: -I parameter below is the uppercase letter “i”):

# dhcpcd -I 01:de:ad:ba:be:ab:ee eth0:1
Code:
dhcpcd: open_control: Connection refused
dhcpcd: version 5.2.2 starting
dhcpcd: eth0:1: broadcasting for a lease
dhcpcd: eth0:1: offered 83.28.23.23 from 192.168.1.254
dhcpcd: eth0:1: acknowledged 83.28.23.23 from 192.168.1.254
dhcpcd: eth0:1: checking for 83.28.23.23
dhcpcd: eth0:1: leased 83.28.23.23 for 30 seconds
dhcpcd: forking to background
/var/log/messages:
Code:
Oct 16 11:41:03 brightstar dhcpcd: version 5.2.2 starting
Oct 16 11:41:03 brightstar dhcpcd: eth0:1: broadcasting for a lease
Oct 16 11:41:03 brightstar dhcpcd: eth0:1: offered 83.28.23.23 from 192.168.1.254
Oct 16 11:41:03 brightstar dhcpcd: eth0:1: acknowledged 83.28.23.23 from 192.168.1.254
Oct 16 11:41:03 brightstar dhcpcd: eth0:1: checking for 83.28.23.23
Oct 16 11:41:09 brightstar dhcpcd: eth0:1: leased 83.28.23.23 for 30 seconds
Oct 16 11:41:09 brightstar dhcpcd: forking to background
Oct 16 11:41:24 brightstar dhcpcd: eth0:1: renewing lease of 83.28.23.23
Oct 16 11:41:24 brightstar dhcpcd: eth0:1: acknowledged 83.28.23.23 from 192.168.1.254
Oct 16 11:41:24 brightstar dhcpcd: eth0:1: leased 83.28.23.23 for 30 seconds
Oct 16 11:41:39 brightstar dhcpcd: eth0:1: renewing lease of 83.28.23.23
Oct 16 11:41:39 brightstar dhcpcd: eth0:1: acknowledged 83.28.23.23 from 192.168.1.254
Oct 16 11:41:39 brightstar dhcpcd: eth0:1: leased 83.28.23.23 for 30 seconds
Oct 16 11:41:54 brightstar dhcpcd: eth0:1: renewing lease of 83.28.23.23
Oct 16 11:41:54 brightstar dhcpcd: eth0:1: acknowledged 83.28.23.23 from 192.168.1.254
Oct 16 11:41:54 brightstar dhcpcd: eth0:1: leased 83.28.23.23 for 30 seconds
Oct 16 11:42:09 brightstar dhcpcd: eth0:1: renewing lease of 83.28.23.23
Oct 16 11:42:09 brightstar dhcpcd: eth0:1: acknowledged 83.28.23.23 from 192.168.1.254
Oct 16 11:42:09 brightstar dhcpcd: eth0:1: leased 83.28.23.23 for 30 seconds
In the above context there are multiple “renewing lease” messages. I disussed it in dhcpcd: eth0: renewing lease thread and niknah calmed me down saying that these messages seem harmless.

/var/log/syslog:
Code:
Oct 16 11:41:03 brightstar dhcpcd: open_control: Connection refused
Oct 16 11:41:55 brightstar kernel: Invalid packet: IN=eth0 OUT= MAC=de:ad:ba:be:ab:ed:aa:bb:cc:dd:ee:ff:08:00 SRC=74.15.39.19 DST=83.28.23.23 LEN=40 TOS=0x00 PREC=0x00 TTL=52 ID=15495 PROTO=TCP SPT=995 DPT=43514 WINDOW=0 RES=0x00 RST URGP=0 
Oct 16 11:41:55 brightstar kernel: Invalid packet: IN=eth0 OUT= MAC=de:ad:ba:be:ab:ed:aa:bb:cc:dd:ee:ff:08:00 SRC=74.15.39.19 DST=83.28.23.23 LEN=40 TOS=0x00 PREC=0x00 TTL=52 ID=15496 PROTO=TCP SPT=995 DPT=43514 WINDOW=0 RES=0x00 RST URGP=0
Notice de:ad:ba:be:ab:ed:aa:bb:cc:dd:ee:ff:08:00 address above. It’s a merger of de:ad:ba:be:ab:ed hardware address, aa:bb:cc:dd:ee:ff virtual address and 08:00 suffix. Firewall reports above some Internet traffic.

Testing interfaces (after dhcpcd with alias)

# ifconfig
Code:
eth0      Link encap:Ethernet  HWaddr de:ad:ba:be:ab:ed  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: deaf:abbe:bade:dead:beef:feed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:201 errors:0 dropped:0 overruns:0 frame:0
          TX packets:203 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:51315 (50.1 KiB)  TX bytes:20468 (19.9 KiB)
          Memory:ee000000-ee020000 

eth0:1    Link encap:Ethernet  HWaddr de:ad:ba:be:ab:ed  
          inet addr:83.28.23.23  Bcast:83.28.23.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Memory:ee000000-ee020000 

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:85 errors:0 dropped:0 overruns:0 frame:0
          TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7360 (7.1 KiB)  TX bytes:7360 (7.1 KiB)

pan0      Link encap:Ethernet  HWaddr ce:de:be:ad:ca:fe  
          inet addr:19.24.11.12  Bcast:19.24.255.255  Mask:255.255.0.0
          inet6 addr: cafe:babe:bade:deaf:abbe:face/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:636 (636.0 B)

wlan0     Link encap:Ethernet  HWaddr de:ad:fa:ce:de:ed  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
# route
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth0
83.28.23.0    *               255.255.255.0   U     202    0        0 eth0
19.24.0.0     *               255.255.0.0     U     202    0        0 eth0
19.24.0.0     *               255.255.0.0     U     204    0        0 pan0
loopback        *               255.0.0.0       U     0      0        0 lo
default         83-28-23-23. 0.0.0.0         UG    202    0        0 eth0
And finally Internet connection works on eth0:1 interface (compare eth0:1 entry in ifconfig output and default entry in route output). Local network works on eth0 interface.

Second machine (shadystar)

The procedure of gaining Internet access is now very simple.

Testing interfaces (after boot)

After boot of the system I test interfaces with ifconfig.

# ifconfig
Code:
eth0      Link encap:Ethernet  HWaddr 11:22:33:44:55:66  
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: 1111:2222:3333:4444:5555:6666/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:60 (60.0 B)  TX bytes:636 (636.0 B)

eth0:1    Link encap:Ethernet  HWaddr 11:22:33:44:55:66  
          inet addr:19.24.14.25  Bcast:19.24.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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:82 errors:0 dropped:0 overruns:0 frame:0
          TX packets:82 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7204 (7.0 KiB)  TX bytes:7204 (7.0 KiB)
Notice working eth0:1 interface above. On the first machine it’s free. On the second is for some reason occupied.

# route
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth0
19.24.0.0     *               255.255.0.0     U     203    0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
Running dhcpcd with an alias

Because eth0:1 interface is busy we need now eth0:2 interface. So we precede hardware address of the Ethernet card on the second machine by 02 and we add to that address 2. Ethernet card hardware address is 11:22:33:44:55:66. After mentioned operations we get 02:11:22:33:44:55:68 string for eth0:2 interface:

# dhcpcd -I 02:11:22:33:44:55:68 eth0:2
Code:
dhcpcd: open_control: Connection refused
dhcpcd: version 5.2.2 starting
dhcpcd: eth0:2: broadcasting for a lease
dhcpcd: eth0:2: offered 83.28.23.23 from 192.168.1.254
dhcpcd: eth0:2: acknowledged 83.28.23.23 from 192.168.1.254
dhcpcd: eth0:2: checking for 83.28.23.23
dhcpcd: eth0:2: leased 83.28.23.23 for 30 seconds
dhcpcd: forking to background
/var/log/messages:
Code:
Oct 16 11:55:02 shadystar dhcpcd: version 5.2.2 starting
Oct 16 11:55:02 shadystar dhcpcd: eth0:2: broadcasting for a lease
Oct 16 11:55:04 shadystar dhcpcd: eth0:2: offered 83.28.23.23 from 192.168.1.254
Oct 16 11:55:04 shadystar dhcpcd: eth0:2: acknowledged 83.28.23.23 from 192.168.1.254
Oct 16 11:55:04 shadystar dhcpcd: eth0:2: checking for 83.28.23.23
Oct 16 11:55:10 shadystar dhcpcd: eth0:2: leased 83.28.23.23 for 30 seconds
Oct 16 11:55:10 shadystar dhcpcd: forking to background
Oct 16 11:55:25 shadystar dhcpcd: eth0:2: renewing lease of 83.28.23.23
Oct 16 11:55:25 shadystar dhcpcd: eth0:2: acknowledged 83.28.23.23 from 192.168.1.254
Oct 16 11:55:25 shadystar dhcpcd: eth0:2: leased 83.28.23.23 for 30 seconds
Oct 16 11:55:40 shadystar dhcpcd: eth0:2: renewing lease of 83.28.23.23
Oct 16 11:55:40 shadystar dhcpcd: eth0:2: acknowledged 83.28.23.23 from 192.168.1.254
Oct 16 11:55:40 shadystar dhcpcd: eth0:2: leased 83.28.23.23 for 30 seconds
Oct 16 11:55:55 shadystar dhcpcd: eth0:2: renewing lease of 83.28.23.23
Oct 16 11:55:55 shadystar dhcpcd: eth0:2: acknowledged 83.28.23.23 from 192.168.1.254
Oct 16 11:55:55 shadystar dhcpcd: eth0:2: leased 83.28.23.23 for 30 seconds
/var/log/syslog:
Code:
Oct 16 11:55:02 shadystar dhcpcd: open_control: Connection refused
Oct 16 11:57:36 shadystar kernel: INPUT packet died: IN=eth0 OUT= MAC=11:22:33:44:55:66:11:22:33:44:55:66:08:00 SRC=20.15.22.11 DST=83.28.23.23 LEN=48 TOS=0x00 PREC=0x00 TTL=111 ID=48754 PROTO=TCP SPT=32510 DPT=22 WINDOW=65535 RES=0x00 SYN URGP=0 
Oct 16 11:58:36 shadystar kernel: INPUT packet died: IN=eth0 OUT= MAC=11:22:33:44:55:66:11:22:33:44:55:66:08:00 SRC=83.21.80.15 DST=83.28.23.23 LEN=64 TOS=0x00 PREC=0x00 TTL=33 ID=15304 DF PROTO=TCP SPT=1900 DPT=135 WINDOW=53760 RES=0x00 SYN URGP=0
Firewall reports above some traffic from Internet.

Testing interfaces (after dhcpcd with alias)

# ifconfig
Code:
eth0      Link encap:Ethernet  HWaddr 11:22:33:44:55:66  
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: 1111:2222:3333:4444:5555:6666/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:127 errors:0 dropped:0 overruns:0 frame:0
          TX packets:158 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:25955 (25.3 KiB)  TX bytes:17389 (16.9 KiB)

eth0:1    Link encap:Ethernet  HWaddr 11:22:33:44:55:66  
          inet addr:19.24.14.25  Bcast:19.24.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:2    Link encap:Ethernet  HWaddr 11:22:33:44:55:66  
          inet addr:83.28.23.23  Bcast:83.28.23.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

irda0     Link encap:IrLAP  HWaddr aa:bb:cc:dd  
          UP RUNNING NOARP  MTU:2048  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:8 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

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:85 errors:0 dropped:0 overruns:0 frame:0
          TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:7360 (7.1 KiB)  TX bytes:7360 (7.1 KiB)
# route
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.255.255.0   U     0      0        0 eth0
83.238.233.0    *               255.255.255.0   U     203    0        0 eth0
19.24.0.0     *               255.255.0.0     U     203    0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         83-28-23-23. 0.0.0.0         UG    203    0        0 eth0
The connection with Internet is established on eth0:2 interface. Local network works on eth0 interface. The problem is solved.

Last edited by w1k0; 10-16-2010 at 10:01 AM. Reason: a mistake
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DDclient slack13 dhcpcd.sh vs dhcpcd.eth0.exe question nl1at Slackware 3 10-27-2010 01:51 PM
dhcpcd wireless problems. dhcpcd wlan0 removes essid entry in iwconfig. Romanus81 Slackware 3 08-25-2008 10:34 PM
dhcpcd segfault dlinux Zenwalk 1 06-15-2008 08:35 AM
2.6.11 kernel or glibc segfault everywhere..? Yerp Linux From Scratch 5 05-20-2005 03:42 PM
Alsa + new kernel = segfault JohnGalt00 Red Hat 0 09-03-2003 06:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration