Hot to setup 2 network adapters on ubuntu with vmware

1

1

I've have an idea of following configuration:

Image 1: Ubuntu with GUI in LAN segment, static configuration

Image 2: Server-Ubuntu in the same LAN segment, plus second network adapter in NAT-Mode to have access to the internet.

What I've done:

Configured LAN Segment - no problems here. Then I added second network adapter on the second image and added it into /etc/network/interfaces. Also I modified the routing table.

Contents of /etc/network/interfaces

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 10.1.2.1
    netmask 255.255.255.0
    network 10.1.2.0
    broadcast 10.1.2.255
    dns-nameservers 10.1.2.1

auto eth1
iface eth1 inet dhcp

And this is how the routing table looks at the moment:

Kernel IP routing table
Destination        Gateway        Genmask        Flags Metric Ref    Use    Iface
default            192.168.174.1  0.0.0.0        UG    100    0      0      eth1
10.1.2.0           *              255.255.255.0  U     0      0      0      eth0
192.168.174.0      *              255.255.255.0  U     0      0      0      eth1

Alas this seems to be wrong at some point, because no extern hosts are reachable. Could somebody help me to figure it out?

Danny Lo

Posted 2014-04-11T09:25:05.893

Reputation: 172

Answers

1

Removing

#netmask 255.255.255.0
#network 10.1.2.0
#broadcast 10.1.2.255

Solved the problem!

Danny Lo

Posted 2014-04-11T09:25:05.893

Reputation: 172