1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72 |
buildbox@tnbuildbox:~$ sudo /etc/init.d/networking restart
* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
* Reconfiguring network interfaces... [ OK ]
buildbox@tnbuildbox:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0:0
iface eth0:0 inet static
address 10.10.10.10
netmask 255.255.255.0
gateway 10.10.10.254
buildbox@tnbuildbox:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:b7:15:8c brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
inet 10.10.10.10/24 scope global eth0:0
inet6 fe80::a00:27ff:feb7:158c/64 scope link
valid_lft forever preferred_lft forever
buildbox@tnbuildbox:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
default 10.10.10.254 0.0.0.0 UG 100 0 0 eth0
10.0.2.0 * 255.255.255.0 U 1 0 0 eth0
10.10.10.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 1000 0 0 eth0
buildbox@tnbuildbox:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:b7:15:8c
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:feb7:158c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:86023 errors:0 dropped:0 overruns:0 frame:0
TX packets:28219 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:105644369 (105.6 MB) TX bytes:1599887 (1.5 MB)
eth0:0 Link encap:Ethernet HWaddr 08:00:27:b7:15:8c
inet addr:10.10.10.10 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
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:46 errors:0 dropped:0 overruns:0 frame:0
TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3738 (3.7 KB) TX bytes:3738 (3.7 KB) |