You are not logged in.

#1 2012-06-10 17:42:17

justinesmithies
Member
From: Cruden Bay , Scotland
Registered: 2012-06-08
Posts: 26

network setup help

I need some help setting up my three eth interfaces as its driving me bonkers.

At the moemnt in my rc.conf i have only one setup which is connected to the internet ( router ).

# NETWORKING
# ----------
HOSTNAME="justine"

interface=eth0
address=192.168.0.2
netmask=255.255.255.0
broadcast=192.168.0.0
gateway=192.168.0.1



NETWORK_PERSIST="no"


I though i could just add the extra like this but it doesnt seem to work.

# NETWORKING
# ----------
HOSTNAME="justine"

interface=eth0
address=192.168.0.2
netmask=255.255.255.0
broadcast=192.168.0.0
gateway=192.168.0.1

interface=eth1
address=192.168.1.2
netmask=255.255.255.0
broadcast=192.168.1.0
gateway=192.168.0.1

interface=eth0
address=192.168.2.2
netmask=255.255.255.0
broadcast=192.168.2.0
gateway=192.168.0.1

NETWORK_PERSIST="no"

What i want is eth0 to be the connection to the internet

And eth1 & eth2 must have access to the net too but i will use fwbuilder later to firewall them.

Can someone please help me out ?

Thanx in advance.


“Microsoft sells you Windows … Linux gives you the whole house.”

2 x Dual core Xeon 5160 @ 3.0Ghz , 8 Gb Ram , Nvidia GTX 560 TI 1Gb on 2 x Neovo 19" LCD's, 1Tb HD , Sound Blaster Audigy2 all running on Arch Linux 64.

Offline

#2 2012-06-10 17:58:58

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,447

Re: network setup help

Please use code tags for your long output.
You don't have an "eth2" in that posting by the way, but it would be wrong there anyway. You can only configure the primary interface in rc.conf. Re-think your use of gateway for eth1/2 also.

https://wiki.archlinux.org/index.php/Co … ng_Network
and /etc/network.d/examples/
have a lot for you!

Offline

#3 2012-06-10 18:53:36

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,064

Re: network setup help

Also, you are using three different subnets.  192.168.1.*, 192.168.2.*, and 192.168.3.*.  Your network mask is 255.255.255.0.  The way you are setting it up implies there are three separate subnets with routers in between them.

So, are you connecting all three ports to the same router, placing them all on the same subnet ?  (That wont work with the address space you are using.  The first three bytes have to be the same for all devices on the subnet)

Or... Are you trying to create multiple subnets and use the Arch box as the bridge between subnets  ?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2012-06-10 19:48:01

justinesmithies
Member
From: Cruden Bay , Scotland
Registered: 2012-06-08
Posts: 26

Re: network setup help

What i am after doing is to have eth0 as the main internet gateway , the connection to the modem. I then want two seperate lan interfaces one for the kids pc's etc and one for me to do as i please. How do i set them up , i will be using fwbuilder to implement the firewall once i have managed to get the other two interfaces up and runing. Pre firewall i just want to enable both lan interfaces to be able to access the internet via eth0 . I can sort out access etc later.

Can someone give me the correct setup - ip / netmasks etc to do the above ?

For eth1 for example would this be ok and give me 254 usable ip's for 192.168.1.* ?

ipcalc -nb 192.168.1.1 -s 254
Address:   192.168.1.1          
Netmask:   255.255.255.0 = 24   
Wildcard:  0.0.0.255            
=>
Network:   192.168.1.0/24       
HostMin:   192.168.1.1          
HostMax:   192.168.1.254        
Broadcast: 192.168.1.255        
Hosts/Net: 254                   Class C, Private Internet

1. Requested size: 254 hosts
Netmask:   255.255.255.0 = 24   
Network:   192.168.1.0/24       
HostMin:   192.168.1.1          
HostMax:   192.168.1.254        
Broadcast: 192.168.1.255        
Hosts/Net: 254                   Class C, Private Internet

Needed size:  256 addresses.
Used network: 192.168.1.0/24
Unused:

But where would i configure eth1 & eth2 ?

Last edited by justinesmithies (2012-06-10 19:52:16)


“Microsoft sells you Windows … Linux gives you the whole house.”

2 x Dual core Xeon 5160 @ 3.0Ghz , 8 Gb Ram , Nvidia GTX 560 TI 1Gb on 2 x Neovo 19" LCD's, 1Tb HD , Sound Blaster Audigy2 all running on Arch Linux 64.

Offline

#5 2012-06-10 20:32:31

justinesmithies
Member
From: Cruden Bay , Scotland
Registered: 2012-06-08
Posts: 26

Re: network setup help

Sorted out setting the nic cards with the help of this page http://matthieu.yiptong.ca/2011/06/22/c … ux-netcfg/

Setup /etc/conf.d/network and placed files in /etc/network.d and added net-profiles to the daemons line .
Unsure wether i should leave eth0 in rc.conf and have

DAEMONS=(syslog-ng network net-profiles crond dbus alsa httpd webmin mysqld)
 

network still there or do i move eth0 to /etc/network.d too ???

Now for the routing so all interfaces eth1 & eth2 can access the internet via eth0


“Microsoft sells you Windows … Linux gives you the whole house.”

2 x Dual core Xeon 5160 @ 3.0Ghz , 8 Gb Ram , Nvidia GTX 560 TI 1Gb on 2 x Neovo 19" LCD's, 1Tb HD , Sound Blaster Audigy2 all running on Arch Linux 64.

Offline

#6 2012-06-10 21:16:46

justinesmithies
Member
From: Cruden Bay , Scotland
Registered: 2012-06-08
Posts: 26

Re: network setup help

Why do eth1 & eth2 fail . i know i have nothing connected but surely they sould be assigned ip's ??

:: ethernet0-static down                                                 [DONE] 
:: ethernet0-static up                                                   [DONE] 
:: ethernet1-static up                                                   [BUSY]  > No connection
                                                                         [FAIL] 
:: ethernet2-static up                                                   [BUSY]  > No connection
                                                                         [FAIL] 

“Microsoft sells you Windows … Linux gives you the whole house.”

2 x Dual core Xeon 5160 @ 3.0Ghz , 8 Gb Ram , Nvidia GTX 560 TI 1Gb on 2 x Neovo 19" LCD's, 1Tb HD , Sound Blaster Audigy2 all running on Arch Linux 64.

Offline

#7 2012-06-10 22:21:13

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: network setup help

Post your profiles.

Offline

#8 2012-06-10 22:45:16

justinesmithies
Member
From: Cruden Bay , Scotland
Registered: 2012-06-08
Posts: 26

Re: network setup help

/etc/conf.d/netcfg

# Enable these netcfg profiles at boot-up.
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a '@' to background its startup
# Network profiles are found in /etc/network.d
#
#NETWORKS=(menu)

## Specify the name of your wired interface for net-auto-wired
#WIRED_INTERFACE="eth0"


NETWORKS=(ethernet0-static ethernet1-static ethernet2-static)


## Specify the name of your wireless interface for net-auto-wireless
WIRELESS_INTERFACE="wlan0"

## List of profiles that can be started by net-auto-wireless
## defaults to the list of all wireless profiles
#AUTO_PROFILES="profile1 profile2"
 

/etc/network.d/ethernet0-static

CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection using iproute'
INTERFACE='eth0'
IP='static'
ADDR='192.168.0.2'
NETMASK='255.255.255.0'
BROADCAST='192.168.0.0'
GATEWAY='192.168.0.1'
DNS=('212.159.13.49' '212.159.13.50')


#ROUTES=('192.168.0.0/24 via 192.168.1.2') 

/etc/network.d/ethernet1-static

 CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection using iproute'
INTERFACE='eth1'
IP='static'
ADDR='192.168.1.2'
NETMASK='255.255.255.0'
BROADCAST='192.168.1.255'
GATEWAY='192.168.0.1'
DNS=('212.159.13.49' '212.159.13.50')


#ROUTES=('192.168.1.0/24 via 192.168.0.2')

/etc/network.d/ethernet2-static

CONNECTION='ethernet'
DESCRIPTION='A basic static ethernet connection using iproute'
INTERFACE='eth2'
IP='static'
ADDR='192.168.2.2'
NETMASK='255.255.255.0'
BROADCAST='192.168.2.255'
GATEWAY='192.168.0.1'
DNS=('212.159.13.49' '212.159.13.50')

#ROUTES=('192.168.0.0/24 via 192.168.1.2') 

/etc/rc.conf

#
# /etc/rc.conf - Main Configuration for Arch Linux
#
# See 'man 5 rc.conf' for more details
#

# LOCALIZATION
# ------------
HARDWARECLOCK="localtime"
TIMEZONE="Europe/London"
KEYMAP="uk"
CONSOLEFONT=
CONSOLEMAP=
LOCALE=
DAEMON_LOCALE="yes"
USECOLOR="yes"

# HARDWARE
# --------
MODULES=()
USEDMRAID="no"
USEBTRFS="no"
USELVM="no"

# NETWORKING
# ----------
HOSTNAME="justine"

#interface=eth0
#address=192.168.0.2
#netmask=255.255.255.0
#broadcast=192.168.0.0
#gateway=192.168.0.1

NETWORK_PERSIST="no"

# DAEMONS
# -------
#
DAEMONS=(syslog-ng !network net-profiles crond dbus alsa httpd webmin mysqld) 

I think thats it all ?


“Microsoft sells you Windows … Linux gives you the whole house.”

2 x Dual core Xeon 5160 @ 3.0Ghz , 8 Gb Ram , Nvidia GTX 560 TI 1Gb on 2 x Neovo 19" LCD's, 1Tb HD , Sound Blaster Audigy2 all running on Arch Linux 64.

Offline

#9 2012-06-11 07:20:03

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: network setup help

Looks about right to me.

What do you mean exactly with "i have nothing connected"? If the involved interfaces have no link at the time (cable not plugged in); you will probably have to use the SKIPNOCARRIER option in your profiles in order to get the interfaces up and running. Netcfg will do a carrier check by default and abort the interface setup if none is detected. Setting the SKIPNOCARRIER option will disable this behaviour.


Burninate!

Offline

#10 2012-06-11 09:17:05

justinesmithies
Member
From: Cruden Bay , Scotland
Registered: 2012-06-08
Posts: 26

Re: network setup help

Thanx Gcool thats bought up my other two interfaces. smile

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:19:66:55:31:13 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.2/24 brd 192.168.0.255 scope global eth0
    inet6 fe80::219:66ff:fe55:3113/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:1a:ee:01:96:23 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.2/24 brd 192.168.1.255 scope global eth1
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:1a:ee:01:8c:34 brd ff:ff:ff:ff:ff:ff

I had to remove the GATEWAY lines from eth1 & eth2 to get them to come up though.

I also changed eth1 ip to 192.168.1.1 and eth2 to 192.168.2.1 , as eth0 has to be 192.168.0.2 as the modem is 192.168.0.1

Now how do i make sure that computers connected to either eth1 or eth2 have access to the internet via eth0 ?

Last edited by justinesmithies (2012-06-11 09:23:07)


“Microsoft sells you Windows … Linux gives you the whole house.”

2 x Dual core Xeon 5160 @ 3.0Ghz , 8 Gb Ram , Nvidia GTX 560 TI 1Gb on 2 x Neovo 19" LCD's, 1Tb HD , Sound Blaster Audigy2 all running on Arch Linux 64.

Offline

#11 2012-06-11 09:28:03

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: network setup help

Actually, eth2 is not up according to that output - eth0 and eth1 have the ip addresses you want, eth2 doesn't.

What you're doing here is setting up a router - you have three different subnets, and you want to route between them. There's a wiki page for that.

Offline

#12 2012-06-11 13:16:00

justinesmithies
Member
From: Cruden Bay , Scotland
Registered: 2012-06-08
Posts: 26

Re: network setup help

eth2 is up

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:19:66:55:31:13 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.2/24 brd 192.168.0.255 scope global eth0
    inet6 fe80::219:66ff:fe55:3113/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:1a:ee:01:96:23 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global eth1
4: eth2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:1a:ee:01:8c:34 brd ff:ff:ff:ff:ff:ff
    inet 192.168.2.1/24 brd 192.168.2.255 scope global eth2
 

“Microsoft sells you Windows … Linux gives you the whole house.”

2 x Dual core Xeon 5160 @ 3.0Ghz , 8 Gb Ram , Nvidia GTX 560 TI 1Gb on 2 x Neovo 19" LCD's, 1Tb HD , Sound Blaster Audigy2 all running on Arch Linux 64.

Offline

Board footer

Powered by FluxBB