Hi All,
I've been trying to understand how Linux creates the network/interfaces on a machine (been reading the Linux admin guide), but as I'm pretty new to this subject, I've got lost in the forest.
To provide with my goal:
1.) Learn about network setups on Linux
2.) Be able to maintain my own (virtual) network
3.) Configure my (virtual) network
What I've done so far:
Guest system
/etc/hosts
Quote:
127.0.0.1 localhost
127.0.1.1 sms
172.16.34.2 gw.mylaptop.com gw vmnet8 #Not sure what is the function of this line
172.14.34.5 sms.mylaptop.com sms
|
/etc/networks
/etc/network/interfaces
Quote:
auth eth0
iface eth0 inet static
address 172.16.34.5
mask 255.255.255.0
broadcast 172.16.34.255
network 172.16.34.0
|
ifconfig eth0:
Quote:
eth0 Link encap:Ethernet HWaddr 00:0c:29:bd:4b:9b
inet addr:172.16.34.5 Bcast:172.16.34.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:354 (354.0 B) TX bytes:1054 (1.0 KB)
Interrupt:19 Base address:0x2000
|
route -n
Quote:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.34.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
|
The host system
/etc/hosts:
Quote:
127.0.0.1 localhost
127.0.1.1 pdaalder-laptop
172.16.46.2 gw.mylaptop.com gw vmnet8
172.16.34.5 sms.mylaptop.com sms
172.16.46.6 pdaalder.mylaptop.com pdaalder
|
/etc/networks
Quote:
127.0.0.1 localhost
127.0.1.1 pdaalder-laptop
|
/etc/network/interface
Quote:
not modified, but I did run the command: ifconfig eth0 172.16.34.6 mask 255.255.255.0
|
ifconfig eth0:
Quote:
eth0 Link encap:Ethernet HWaddr 00:15:c5:09:c5:5a
inet addr:172.16.34.6 Bcast:172.16.34.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:18
|
route -n
Quote:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.34.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
172.16.34.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 2 0 0 wlan0
192.168.247.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 wlan0
|
I can ping 172.16.34.0 from both the host and guest machine, with -b
What my question is now:
- what have a I achieved?
- what am I missing?
Many thanks for your help (and explanation)
Peter Daalder