Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gentoo & vmware dual nics in non-promiscuous mode [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1159
Location: Online

PostPosted: Tue May 16, 2006 3:12 pm    Post subject: gentoo & vmware dual nics in non-promiscuous mode [SOLVE Reply with quote

Everytime we use vmware after a standard install we will be using the box nic in promiscuous mode soon as we start vmware network.

My question is simple.
Can we use another existent different phisical nic to use it with vmware ?

In other words with regular use of vmware once we setup and start the vmware network vmware will create a virtual nic that will use the box default phisical nic. Lets say eth0.

ie: vmware-virtual-nic ---> <linked> eth0 --> cable --> router -- > wan/lan

my box has 3 physical nics (eth0 eth1 eth2 )
gentoo uses eth0 with a cable that goes to the router and then

gentoo --> eth0 --> router --> wan/lan

what i want is to make vmware to use eth1 with a cable that goes to the router and then wan/lan.

---------| GENTOO --> ETH0 --> CABLE --> ROUTER --> WAN/LAN
BOX -- |
---------| VMWARE --> GENTOO --> ETH1 --> ANOTHER CABLE --> ROUTER --> WAN/LAN


(eth0 and eth1 will have different ips)

im sure this can be done ...and im looking for some tips about it
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244


Last edited by HeXiLeD on Thu Oct 12, 2006 8:32 am; edited 2 times in total
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1159
Location: Online

PostPosted: Tue Jun 06, 2006 7:24 am    Post subject: Reply with quote

ok so no replies yet... ehehe.

Lets divide things in 2 steps.

1: setup 2 nics in gentoo with 2 diferent ips
2: setup vmware to use eth1

I belive that the vmware parte is the easiest; so for now i just need some tips to setup the different 2 nics .

I have created the respective init script for eth1 and even added another ip/setting in /etc/conf.d/net
however it fails here:

Code:
# /etc/init.d/net.eth1 start
 * Starting eth1
 *   Bringing up eth1
 *     <***.***.***.***>                     [ ok ]
 *   Adding routes
 *     default gw <***.***.***.***> ...  [ !! ]


It fails when looking for the gateway. ( i have specified the gateway="eth1/<ip>" ) in conf.d/net because it seems unable to use the same ip/gateway that eth0 uses.
So i tested it by adding another ip there as if i had another router/gateway and it worked.

Unless i can work this around in with gentoo.... the other fast and possible way is to had another router to the network to be setup between my box and the main router. ( this option does suck a bit )

and that would be like this:

---------| GENTOO --> ETH0 --> CABLE --> MAIN-ROUTER --> WAN/LAN
BOX -- |
---------| VMWARE --> GENTOO --> ETH1 --> ANOTHER CABLE --> ROUTER2/WITH-DIFFERENT-GATEWAY --> MAIN-ROUTER --> WAN/LAN



For some reason both nics (eth0 & eth1) seem to fail to use the same gateway. . Is it suppose to be like this ?
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244


Last edited by HeXiLeD on Thu Oct 12, 2006 9:43 am; edited 1 time in total
Back to top
View user's profile Send private message
Philantrop
Retired Dev
Retired Dev


Joined: 21 Dec 2004
Posts: 1130
Location: Germany

PostPosted: Fri Jun 16, 2006 6:43 am    Post subject: Reply with quote

Blue-Steel wrote:
For some reason both nics (eth0 & eth1) seem to fail to use the same gateway. . Is it suppose to be like this ?


Depends. Please post both IPs of eth0 and eth1 and their netmasks.
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1159
Location: Online

PostPosted: Fri Jun 16, 2006 7:42 am    Post subject: Reply with quote

/etc/conf.d/net

Code:
iface_eth0="192.168.1.2 broadcast 192.168.1.255 netmask 255.255.255.0"
gateway="eth0/192.168.1.1

iface_eth1="192.168.1.3 broadcast 192.168.1.255 netmask 255.255.255.0"
gateway="eth1/192.168.1.1


#ifconfig

Code:
eth0      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet addr:192.168.1.2 Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4194287 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2334867 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5310893902 (5064.8 Mb)  TX bytes:178946082 (170.6 Mb)
          Interrupt:177

eth1      Link encap:Ethernet  HWaddr  xx:xx:xx:xx:xx:xx
          inet addr:192.168.1.3 Bcast:192.168.1.255  Mask:255.255.255.0
          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)
          Interrupt:185



# /etc/init.d/net.eth1 start
Code:
 * Starting eth1
 *   Bringing up eth1
 *     192.168.1.3                     [ ok ]
 *   Adding routes
 *     default gw 192.168.1.1 ..   [ !! ]

_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
voytas
Apprentice
Apprentice


Joined: 31 Mar 2004
Posts: 203
Location: Poland, Lodz

PostPosted: Fri Jun 16, 2006 11:37 am    Post subject: Reply with quote

AFAIK you can't have two nics on the same logical network connected two different physical networks...

I suggest bring eth1 up but without any ip configuration, then bridge it with vmware nic (through vmware-config.pl), then in vmware you'll end up with only one interface which can be setup same as eth0 in gentoo (it won't be complaining)

This way you can use eth0 in gentoo and eth1 in vmware.

If you'd like to use eth1 in gentoo you could nat it in vmware...
_________________
LAPTOP: ThinkPad T530
Back to top
View user's profile Send private message
HeXiLeD
Veteran
Veteran


Joined: 20 Aug 2005
Posts: 1159
Location: Online

PostPosted: Thu Oct 12, 2006 8:30 am    Post subject: Reply with quote

currently i have it working flawlessly :)

---------| GENTOO --> ETH0 --> CABLE --> ROUTER --> WAN/LAN
BOX -- |
---------| VMWARE --> GENTOO --> ETH1 --> ANOTHER CABLE --> ROUTER --> WAN/LAN


example of /etc/conf.d/net

Code:
config_eth0=( "192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" )
routes_eth0=( "default gw 192.168.0.1" )

config_eth1=( "192.168.0.3 netmask 255.255.255.0 brd 192.168.0.255" )
routes_eth1=( "default gw 192.168.0.1" )


this topic is solved.
_________________
Do you hear the sound of inevitability?
With age, comes great grumpiness and that, was 20 years ago...

CertFP: becbbd161d5a5c31de3c45171b77bf710911db29 / d985d21f89fe2977b593c4d381a1a86802e62990d9328d893db76d59f9935244
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum