LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
 
LinkBack Search this Thread
Old 12-25-2008, 04:29 AM   #1
ursusca
Member
 
Registered: Sep 2008
Location: Toronto, ON, Canada
Distribution: Gentoo, RHEL (Fedora, CentOS, OEL), Ubuntu, FreeBSD, Solaris 10
Posts: 161

Rep: Reputation: 34
Setup with 2 ethernet interfaces and 2 IP addresses in the same subnet of a class C


Hi all!

I have 2 ethernet cards on my red hat AS 4 server and I want to configure it with 2 ethernet interfaces and 2 different IP addresses in the same subnet of a class C.

How can I do it correctly?
 
Old 12-25-2008, 08:12 AM   #2
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,697

Rep: Reputation: 61
If I understand you are looking at channel bonding. Search www.google.com/linux Search for redhat bonding. Now with this setup only on interface the master has an IP the others are slaves. Not really having an IP.

Brian
 
Old 12-25-2008, 02:32 PM   #3
napo
LQ Newbie
 
Registered: Nov 2008
Distribution: Ubuntu 8.04
Posts: 6

Rep: Reputation: 0
From what I understand all you have to do is set a static ip address for each Network card. Somthing like this:

Code:
sudo ifconfig eth0 192.168.0.1
sudo ifconfig eth1 192.168.0.2
it can also be done in "/etc/network/interfaces" like:

Code:
auto eth0
iface eth0 inet static
    address 192.168.0.1
    network 192.168.0.0
    netmask 255.255.255.0
    broadcast 192.168.0.255

auto eth1
iface eth1 inet static
    address 192.168.0.2
    network 192.168.0.0
    netmask 255.255.255.0
    broadcast 192.168.0.255
 
Old 12-25-2008, 04:21 PM   #4
ursusca
Member
 
Registered: Sep 2008
Location: Toronto, ON, Canada
Distribution: Gentoo, RHEL (Fedora, CentOS, OEL), Ubuntu, FreeBSD, Solaris 10
Posts: 161

Original Poster
Rep: Reputation: 34
You are right napo.
Now I have:

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:E0:80:79:9F:53
ONBOOT=yes
TYPE=Ethernet
IPADDR=XXX.XXX.XXX.12
NETMASK=255.255.255.0
USERCTL=no
IPV6INIT=no
PEERDNS=yes
GATEWAY=XXX.XXX.XXX.91

/etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
BOOTPROTO=none
HWADDR=00:E0:81:79:9F:55
ONBOOT=yes
TYPE=Ethernet
IPADDR=XXX.XXX.XXX.11
NETMASK=255.255.255.0
USERCTL=no
IPV6INIT=no
PEERDNS=yes
GATEWAY=XXX.XXX.XXX.91

I can't understand how it's working because when I down one of interfaces I can ping both.

Last edited by ursusca; 12-25-2008 at 04:23 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ISC dhcp3 (ver. 3.04) vlan setup giving out of improper subnet addresses Valkyr1e Linux - Server 1 07-26-2008 11:15 AM
Binding 2 NICs (MAC addresses) to 2 IP Addresses in same Subnet RedHat EL4.0 skhira Linux - Networking 13 02-24-2008 08:16 PM
Binding 2 NICs (MAC addresses) to 2 IP Addresses in same Subnet RedHat EL4.0 skhira Linux - Networking 1 02-09-2008 07:17 AM
Can I access class A and class C ip address using one ethernet card? fakhrul Linux - Networking 4 10-21-2007 01:34 AM


All times are GMT -5. The time now is 09:08 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration