LinuxQuestions.org
Review your favorite Linux distribution.
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 06-22-2006, 12:03 PM   #1
Zingaro2002
Member
 
Registered: Feb 2002
Location: Italy
Distribution: Fedora Core 1, Red Hat 8, Red Hat 9, Knoppix 3.3 (debian sarge)
Posts: 97

Rep: Reputation: 15
Debian Sarge: 2 ethernet cards and 2 IP groups


Hi guys!

I've installed a wonderful Debian Sarge 3.1 r0a on an HP Proliant DL320 G3 that is:

ftp server
proxy server
and very soon
web server
mail server
LAMP server

And I have some problem...
There are two ethernet cards (NIC1 and NIC2), I'm not sure that they have been both recognized and installed... because when they are both active my machine can't connect to Internet and is not pingable by other PCs on the same LAN.

This is my goal: to assign a group of PRIVATE STATIC IP ADDRESSES (192.168.0.xyz) (with gateway 192.168.0.6) to the first ethernet card and to assign another group of PUBLIC STATIC IP ADDRESSES (80.18.214.abc) (WITH gateway 80.18.214.145) to the second ethernet card.

By now, for semplicity, I tried to assign JUST ONE private IP address to the first card and JUST ONE public IP address to the second card.

question: how can I test that both net cards are correctly installed and working?

At bootstrap boot messages are too fast... I think I can see that eth0 is UP but I don't see eth1...

If I use KDE (K -> System -> Net) and disable the second card then both IPs are reachable...

Have you got any hint?

Thanks in advance!!!
 
Old 06-22-2006, 12:21 PM   #2
Zingaro2002
Member
 
Registered: Feb 2002
Location: Italy
Distribution: Fedora Core 1, Red Hat 8, Red Hat 9, Knoppix 3.3 (debian sarge)
Posts: 97

Original Poster
Rep: Reputation: 15
ifconfig and other informations

ifconfig says:

eth0 Link encap:Ethernet HWaddr 00:14:C2:3B:75:B0
inet addr:192.168.0.180 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::214:c2ff:fe3b:75b0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:488054 errors:0 dropped:0 overruns:0 frame:0
TX packets:412960 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:206650997 (197.0 MiB) TX bytes:372853784 (355.5 MiB)
Interrupt:201

eth0:0 Link encap:Ethernet HWaddr 00:14:C2:3B:75:B0
inet addr:80.18.214.147 Bcast:80.18.214.159 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:201

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:68209 errors:0 dropped:0 overruns:0 frame:0
TX packets:68209 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:41682063 (39.7 MiB) TX bytes:41682063 (39.7 MiB)

°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°

my /etc/network/interfaces is

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
name Scheda di rete Ethernet
address 192.168.0.180
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.6

auto eth0:0
iface eth0:0 inet static
name Scheda di rete Ethernet
address 80.18.214.147
netmask 255.255.255.241
network 80.18.214.145
broadcast 80.18.214.159
gateway 80.18.214.145

°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°

and /etc/network/options is

ip_forward=no
spoofprotect=yes
syncookies=no

and /etc/network/run/ifstate is

lo=lo
eth0=eth0


Thanks anyway!
Bye

 
Old 06-22-2006, 12:39 PM   #3
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Well, only one of your 2 NICs have been recognized at present. See the MAC addresses are same.
Code:
eth0 Link encap:Ethernet HWaddr 00:14:C2:3B:75:B0
Code:
eth0:0 Link encap:Ethernet HWaddr 00:14:C2:3B:75:B0
So, there's no use in assigning different ipaddresses to a single card.

Try doing
Code:
lspci
and
Code:
dmesg | grep eth
And post the output here. If you could find only one entry for the ethernet card (eg eth0), then maybe you will need to manually install dirvers for the second card (eg eth1).
 
Old 06-23-2006, 03:03 AM   #4
Zingaro2002
Member
 
Registered: Feb 2002
Location: Italy
Distribution: Fedora Core 1, Red Hat 8, Red Hat 9, Knoppix 3.3 (debian sarge)
Posts: 97

Original Poster
Rep: Reputation: 15
lspci says:

0000:00:00.0 Host bridge: Intel Corp. Server Memory Controller Hub (rev 05)
0000:00:01.0 PCI bridge: Intel Corp. Server Memory Controller Hub PCI Express Port (rev 05)
0000:00:1c.0 PCI bridge: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03)
0000:00:1d.0 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
0000:00:1d.1 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)
0000:00:1d.2 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)
0000:00:1d.3 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)
0000:00:1d.7 USB Controller: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)
0000:00:1e.0 PCI bridge: Intel Corp. 82801 PCI Bridge (rev d3)
0000:00:1f.0 ISA bridge: Intel Corp. 82801FB/FR (ICH6/ICH6R) LPC Interface Bridge (rev 03)
0000:00:1f.1 IDE interface: Intel Corp. 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 03)
0000:00:1f.2 IDE interface: Intel Corp. 82801FR/FRW (ICH6R/ICH6RW) SATA Controller (rev 03)
0000:01:02.0 System peripheral: Compaq Computer Corporation Integrated Lights Out Controller (rev 01)
0000:01:02.2 System peripheral: Compaq Computer Corporation Integrated Lights Out Processor (rev 01)
0000:01:03.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27)
0000:05:00.0 PCI bridge: Intel Corp. PCI Bridge Hub A (rev 09)
0000:05:00.2 PCI bridge: Intel Corp. PCI Bridge Hub B (rev 09)
0000:06:01.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10)
0000:06:01.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet (rev 10)


and dmesg | grep eth says

eth0: Tigon3 [partno(349321-001) rev 2100 PHY(5704)] (PCIX:100MHz:64-bit) 10/100/1000BaseT Ethernet 00:14:c2:3b:75:b0
eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] Split[0] WireSpeed[1] TSOcap[0]
tg3: tg3_request_firmware (eth%d): Couldn't get firmware "tg3/tso-1.4.0".
tg3: eth%d: Firmware "tg3/tso-1.4.0" not loaded; continuing without TSO.
eth1: Tigon3 [partno(349321-001) rev 2100 PHY(5704)] (PCIX:100MHz:64-bit) 10/100/1000BaseT Ethernet 00:14:c2:3b:75:af
eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] Split[0] WireSpeed[1] TSOcap[0]
tg3: eth0: Link is up at 100 Mbps, full duplex.
tg3: eth0: Flow control is on for TX and on for RX.
eth0: no IPv6 routers present
tg3: eth0: Link is down.
tg3: eth0: Link is up at 100 Mbps, full duplex.
tg3: eth0: Flow control is on for TX and on for RX.
tg3: eth0: Link is down.
tg3: eth0: Link is up at 100 Mbps, full duplex.
tg3: eth0: Flow control is on for TX and on for RX.

Thanks for any hint!
 
Old 06-23-2006, 05:20 AM   #5
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Alright the 2 NICs are present finally.
Code:
eth0: Tigon3 [partno(349321-001) rev 2100 PHY(5704)]
(PCIX:100MHz:64-bit) 10/100/1000BaseT Ethernet 00:14:c2:3b:75:b0
Code:
eth1: Tigon3 [partno(349321-001) rev 2100 PHY(5704)]
(PCIX:100MHz:64-bit) 10/100/1000BaseT Ethernet 00:14:c2:3b:75:af
Switch to root user.
Now your /etc/network/interfaces should look like
Code:
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

iface eth0 inet static
address 192.168.0.180
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.6

# NIC connecting to internet directly.
# Please make sure these addresses are correct as
# per your ISP
iface eth1 inet static
address 80.18.214.147
netmask 255.255.255.241
broadcast 80.18.214.159
gateway 80.18.214.145

auto eth0
auto eth1
And your /etc/resolv.conf should have your DNS entries
Code:
search yourispdomain.com
nameserver X.X.X.X # Hint - your primary dns ipaddress
nameserver X.X.X.X # Hint - your primary dns ipaddress
After you have done the appropriate changes, please run
Code:
ifconfig -a
You must see all the settings for all three interfaces ie, eth0, eht1 and lo, restart your network
Code:
/etc/init.d/network restart
Hope, that helps.

Last edited by manishsingh4u; 06-23-2006 at 06:05 AM.
 
Old 06-23-2006, 05:49 AM   #6
Zingaro2002
Member
 
Registered: Feb 2002
Location: Italy
Distribution: Fedora Core 1, Red Hat 8, Red Hat 9, Knoppix 3.3 (debian sarge)
Posts: 97

Original Poster
Rep: Reputation: 15
Thanks, I'll try as soon as possible.
Meanwhile a little doubt: when I run ipconfig it answers

ipconfig: command not found

(my server is a Debian Sarge 3.1 with 2.6 kernel)

The right command seems to be:

ifconfig -a

which displays the status of all interfaces, even those that are down.

If no argumets are given, ifconfig displays the status of the curretly active interfaces.

Last edited by Zingaro2002; 06-23-2006 at 06:03 AM.
 
Old 06-23-2006, 06:07 AM   #7
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Quote:
Originally Posted by Zingaro2002
Thanks, I'll try as soon as possible.
Meanwhile a little doubt: when I run ipconfig it answers

ipconfig: command not found
Sorry, it was my mistake. I posted the command for windows by mistake. It always happens with me as I use windows and Linux at office and home respectively. I have made changes to my last post. Sorry again for the inconvenience.

Last edited by manishsingh4u; 06-23-2006 at 06:09 AM.
 
Old 06-23-2006, 06:10 AM   #8
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
So what do u see when you use
Code:
ifconfig -a
Is your network working now?
 
Old 06-23-2006, 11:50 AM   #9
Zingaro2002
Member
 
Registered: Feb 2002
Location: Italy
Distribution: Fedora Core 1, Red Hat 8, Red Hat 9, Knoppix 3.3 (debian sarge)
Posts: 97

Original Poster
Rep: Reputation: 15
it works!!!

At this moment ifconfig says:

eth0 Link encap:Ethernet HWaddr 00:14:C2:3B:75:B0
inet addr:192.168.0.180 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::214:c2ff:fe3b:75b0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1124 errors:0 dropped:0 overruns:0 frame:0
TX packets:111 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:118136 (115.3 KiB) TX bytes:15921 (15.5 KiB)
Interrupt:201

eth1 Link encap:Ethernet HWaddr 00:14:C2:3B:75:AF
inet addr:80.18.214.147 Bcast:80.18.214.159 Mask:255.255.255.240
inet6 addr: fe80::214:c2ff:fe3b:75af/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1019 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:110991 (108.3 KiB) TX bytes:2336 (2.2 KiB)
Interrupt:209

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

°°°°°°°°°°°°°°°°°°°°°°°°°

my /etc/network/interfaces is

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
#auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
name Scheda di rete Ethernet0
address 192.168.0.180
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.6

auto eth1
iface eth1 inet static
name Scheda di rete Ethernet1
address 80.18.214.147
netmask 255.255.255.240
network 80.18.214.144
broadcast 80.18.214.159
gateway 80.18.214.145

°°°°°°°°°°°°°°°°°

/etc/network/options is

ip_forward=no
spoofprotect=yes
syncookies=no

and /etc/network/run/ifstate is

lo=lo
eth0=eth0
eth1=eth1

Last edited by Zingaro2002; 06-23-2006 at 11:52 AM.
 
Old 06-23-2006, 12:05 PM   #10
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Good to hear that it works now. Enjoy
 
Old 06-28-2006, 10:37 AM   #11
Zingaro2002
Member
 
Registered: Feb 2002
Location: Italy
Distribution: Fedora Core 1, Red Hat 8, Red Hat 9, Knoppix 3.3 (debian sarge)
Posts: 97

Original Poster
Rep: Reputation: 15
Well.. I was happy too soon!

By now i have this configuration

/etc/network/interface:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
name Scheda di rete Ethernet0
address 80.xx.yy.147
netmask 255.255.255.240
network 80.xx.yy.144
broadcast 80.xx.yy.159
#gateway 80.xx.yy.145

auto eth1
iface eth1 inet static
name Scheda di rete Ethernet1
address 192.168.0.180
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.6

°°°°°°°°°°°°°°

I have left eth0 without gateway (so this server goes to Internet using 192.168.0.6 gateway), for the reasons I'll explain soon:

192.168.0.180 is the only visible address by another lan of ours (192.168.9.vv with gateway 192.168.0.6) and I have installed a proxy server on it, so if I deactivate it my proxy-friends can't surf the web...

On the other hand I have 80.xx.yy.147 with the ftp server: it must be visible everywhere.

BY NOW server is visibile and pingable by proxy-friends (at private address) but public IP is still not visible nor pingable by anybody.

If I do
route -n
it says
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
80.xx.yy.144 0.0.0.0 255.255.255.240 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
0.0.0.0 192.168.0.6 0.0.0.0 UG 0 0 0 eth1

and if I do
iptables -L
it says

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

(I've also put ipforwarding=yes in /etc/network/options)
 
Old 06-28-2006, 04:43 PM   #12
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
I think you can get internet connectivity through both of these gateways (80.18.214.145 and 192.168.0.6), so you should try using only one of them. And as you want this server to provide ftp service to external users along with proxy service to the private users.

So what happens if you only use gateway for eth0 (public NIC)
Code:
gateway 80.18.214.145 # Use this line only
And then remove this line from /etc/network/interfaces?
Code:
gateway 192.168.0.6 # Remove this line
Do a network restart..and check if there's any progress. I have a quite similar setup. I have 2 NICs (one public and one private). I am connected to internet through public NIC and I have setup an http / ftp server for myself which I access from outside.
On the other hand I have setup a proxy server on this machine to provide internet connectivity to my room mates.

EDITED:
Quote:
Originally Posted by Zingaro2002
192.168.0.180 is the only visible address by another lan of ours (192.168.9.vv with gateway 192.168.0.6)
This line seems confusing...Is it 192.168.9.x?!


Still, if it doesn't work, then either I am getting it incorrectly or we might need to play with route a bit.

Last edited by manishsingh4u; 06-28-2006 at 05:04 PM.
 
Old 06-29-2006, 02:42 AM   #13
Zingaro2002
Member
 
Registered: Feb 2002
Location: Italy
Distribution: Fedora Core 1, Red Hat 8, Red Hat 9, Knoppix 3.3 (debian sarge)
Posts: 97

Original Poster
Rep: Reputation: 15
Yes it is
192.168.9.x
since these machines are on another lan but they use the same gateway 192.168.0.6

So, in /etc/network/interfaces if I remove the line
gateway 192.168.0.6

the machines on 192.168.9.x lan CANNOT see the private address 192.168.0.180 AND CANNOT ACCESS to the proxy (and obviously they can't surf the web).

I MUST leave the line
gateway 192.168.0.6
and remove the line
gateway 80.18.214.145

As you might have guessed I'm not able with net problems...
Can you suggest how should I use route command?
 
Old 06-29-2006, 04:38 AM   #14
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
I am not confident that it will work for you as I am not completely able to understand why you have such a complex arrangement. Anyway, try these steps -

1) Use only the public gateway ie. 80.18.214.145 on this Debian machine.
2) run this command as root on this machine
Code:
route add -net 192.168.9.0 netmask 255.255.255.0 gw 192.168.0.6 dev eth1
Also try this if the above doesn't work
Code:
route add -net 192.168.9.0 netmask 255.255.255.0 gw 80.18.214.145 dev eth0
3) Use this machine's eth1 ipaddress (192.168.0.180) as a gateway on your other private lan with ipaddress 192.168.9.x. For testing, try apply this setting to only 1 PC.

Last edited by manishsingh4u; 06-29-2006 at 05:03 AM.
 
  


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
2 sound cards shown in alsamixer gui but only one installed in debian sarge system marsh58 Debian 3 06-12-2006 04:19 AM
Biostar nForce 6100-939 on board ethernet card isn't detected by Linux Debian Sarge pinhead47 Linux - Hardware 2 06-06-2006 01:03 PM
Debian Sarge floppy install can't see PCMCIA Cardbus 3Com ethernet card greennick Debian 3 01-12-2006 01:05 PM
Debian Sarge 3.1r0a won't work w/ nForce3 ethernet haertig Linux - Networking 3 10-25-2005 04:45 AM
Ethernet Cards and Sound Cards SchizoIV Linux - Newbie 2 07-05-2002 09:10 PM

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

All times are GMT -5. The time now is 06:39 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