[RESOLVED] Second NIC

Plugging in devices such as LAN adapters, Wi-Fi cards, printers, etc. to Arch Linux ARM.

Re: Second NIC

Postby pepedog » Tue May 24, 2011 8:49 am

This might be your problem
INTERFACES=(eth0 eth1)
not
INTERFACES=(eth0,eth1)

I thought about this, the scripts take each interface entry and do exactly what you did manually, and as one came up and the other didn't, then spotted it straight away.
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Second NIC

Postby jeajea » Tue May 24, 2011 10:40 am

I have two local subnets
Wireless 172.24.80.160/27
Wired 192.168.1.0/24
Eth0 of the Dockstar is connected to wireless via a gigabit switch and a wireless bridge
Eth1 of the Dockstar is connected to wired via a gigabit switch and a power line bridge
I have a Zywall 5 that routes provides routing and firewall between the two subnets and to my DSL modem for internet connection. The Zywall is also the DHCP server for each subnet.

The goal of the second NIC is to allow PCs on either subnet to access the Dockstar shares.

I installed the current base system
I did pacman -Syu

viewtopic.php?f=15&t=1148

I installed samba my smb.conf file and samba is working on eth0
I installed openntpd and set the time zone in rc.conf
I now have installed iptables
I have added the Dockstar’s hostname (DS101) to /etc/hosts
Unrelated I have installed hd-idle but I am not staring it automatically at this time
I haven’t installed anything else

Since you are using DHCP for the Dockstar’s LAN port your router supplies the default gateway. I am using static LAN IP addresses so I must specify the gateway.
$this->bbcode_second_pass_code('', '
login as: root
root@172.24.80.178's password:
Last login: Tue May 24 06:13:58 2011 from 172.24.80.169
[root@DS101 ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 02:50:43:0C:1D:DE
inet addr:172.24.80.178 Bcast:172.24.80.191 Mask:255.255.255.224
inet6 addr: fe80::50:43ff:fe0c:1dde/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:108 errors:0 dropped:0 overruns:0 frame:0
TX packets:101 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10606 (10.3 Kb) TX bytes:11485 (11.2 Kb)
Interrupt:11

eth1 Link encap:Ethernet HWaddr 00:0E:C6:88:7E:A5
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)

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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

')
/etc/rc.d/network restart

doesn't start eth1
$this->bbcode_second_pass_code('', '

[root@DS101 ~]# /etc/rc.d/network restart
:: Stopping Network [FAIL]
:: Starting Network [BUSY] /etc/rc.d/network: line 52: /usr/sbin/iwconfig: No such file or directory
/etc/rc.d/network: line 56: iwgetid: command not found
172.24.80.191,eth1: Host name lookup failure
[FAIL]
[root@DS101 ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 02:50:43:0C:1D:DE
inet addr:172.24.80.178 Bcast:172.24.80.191 Mask:255.255.255.224
inet6 addr: fe80::50:43ff:fe0c:1dde/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:231 errors:0 dropped:0 overruns:0 frame:0
TX packets:174 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22194 (21.6 Kb) TX bytes:20643 (20.1 Kb)
Interrupt:11

eth1 Link encap:Ethernet HWaddr 00:0E:C6:88:7E:A5
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)

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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
')

my current rc.conf

$this->bbcode_second_pass_code('', '
[root@DS101 etc]# cat rc.conf
#
# /etc/rc.conf - Arch Linux ARM install Linux Main Configuration
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
LOCALE="en_US.UTF-8"
HARDWARECLOCK="localtime"
TIMEZONE="America/New_York"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=()

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="DS101"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
# - prefix an entry in INTERFACES with a ! to disable it
# - no hyphens in your interface names - Bash doesn't like it
#
# DHCP: Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#

#Static IP example
eth0="eth0 172.24.80.178 netmask 255.255.255.224 broadcast 172.24.80.191"
eth1="eth1 192.168.1.213 netmask 255.255.255.0 broadcast 192.168.1.255"
#eth0="dhcp"
INTERFACES=(eth0,eth1)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 172.24.80.161"
ROUTES=(gateway)

# Setting this to "yes" will skip network shutdown.
# This is required if your root device is on NFS.
NETWORK_PERSIST="no"

# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)
# - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

#ntpd startup flags
ntpd_flags="-s"
#/etc/rc.d/openntpd restart

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
# - prefix a daemon with a ! to disable it
# - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng network openntpd netfs crond sshd samba)
[root@DS101 etc]#

')
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm

Re: Second NIC

Postby jeajea » Tue May 24, 2011 11:14 am

I replaced the comma with a space and eth1 is now starting at boot but ping still doesn’t work in either direction on the 192.168.1 eth1 subnet.
$this->bbcode_second_pass_code('', '
login as: root
root@172.24.80.178's password:
Last login: Tue May 24 06:54:22 2011 from 172.24.80.169
[root@DS101 ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 02:50:43:60:84:54
inet addr:172.24.80.178 Bcast:172.24.80.191 Mask:255.255.255.224
inet6 addr: fe80::50:43ff:fe60:8454/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:119 errors:0 dropped:0 overruns:0 frame:0
TX packets:94 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12294 (12.0 Kb) TX bytes:11423 (11.1 Kb)
Interrupt:11

eth1 Link encap:Ethernet HWaddr 00:0E:C6:88:7E:A5
inet addr:192.168.1.213 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20e:c6ff:fe88:7ea5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:41 errors:0 dropped:0 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3482 (3.4 Kb) TX bytes:4141 (4.0 Kb)

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:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:178 (178.0 b) TX bytes:178 (178.0 b)

[root@DS101 ~]# ping 192.168.1.204
PING 192.168.1.204 (192.168.1.204) 56(84) bytes of data.
From 192.168.1.213 icmp_seq=1 Destination Host Unreachable
From 192.168.1.213 icmp_seq=2 Destination Host Unreachable
From 192.168.1.213 icmp_seq=3 Destination Host Unreachable
^C
--- 192.168.1.204 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5004ms
pipe 3
[root@DS101 ~]#

')
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm

Re: Second NIC

Postby jeajea » Tue May 24, 2011 11:29 am

I don’t want the Dockstar to route/firewall between the subnets.
I do want the Dockstar and it’s shares available on both subnets.
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm

Re: Second NIC

Postby jeajea » Tue May 24, 2011 3:02 pm

Here is a route display
$this->bbcode_second_pass_code('', '
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.24.80.160 * 255.255.255.224 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
default 172.24.80.161 0.0.0.0 UG 0 0 0 eth0
[root@DS101 log]#

')
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm

Re: Second NIC

Postby pepedog » Tue May 24, 2011 4:26 pm

After you changed the comma to a space, I can't fault what what you have.
Apart from my eth0 and eth1 swapped, mine is pretty similar.
What is 192.168.1.213? If linux, try slogin perhaps.
I tried traceroute without success (I can't ping, icmp blocked), but this worked
[root@myplugbox ~]# slogin 192.168.2.250
root@192.168.2.250's password:
Last login: Mon May 23 23:27:27 2011 from 192.168.2.243
pepedog
Developer
 
Posts: 2431
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Re: Second NIC

Postby jeajea » Tue May 24, 2011 5:25 pm

192.168.1.213 is the Dockstar’s eth1 IP address.
192.168.1.204 is the IP address of a Windows XP notebook PC connected to the same gigabit switch as the Dockstar. The XP box has its firewall off.
192.168.1.35 is a Linux box with no firewall on the same subnet. It also can’t ping the Dockstar and the Dockstar can’t ping the Linux box.

Dockstar to Linux or Linux to Dockstar I get destination host unreachable. Windows to Dockstar I get request timed out.

The Linux box can ping the Windows box and the Windows box can ping the Linux box. This implies that the problem is in some Arch Linux ARM install setting

It acts like the the 192.168.1.0 route for eth1 is being ignored.

I tried setting eth1 to use DHCP. It failed to get an IP address.
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm

Re: Second NIC

Postby WarheadsSE » Tue May 24, 2011 5:36 pm

I dont know, but can you set a default gateway per ethX device?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: Second NIC

Postby jeajea » Tue May 24, 2011 6:36 pm

could this be the solution to my problem?

http://kindlund.wordpress.com/2007/11/1 ... -in-linux/
Jim Anderson
3 Dockstars, 3 Pogoplug V2 and a Zyxel NSA325
Treasure Island, Fl
jeajea
 
Posts: 121
Joined: Wed Aug 25, 2010 4:00 pm

Re: Second NIC

Postby WarheadsSE » Tue May 24, 2011 6:43 pm

Looks like it might, but read the comments, they're pretty detailed :)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

PreviousNext

Return to Hardware

Who is online

Users browsing this forum: No registered users and 13 guests