有两台机器 A是用虚拟机搭载的Ubuntu系统 B机器是直接装的SUSElinux 想通过A与B之间不走外网,直接连接一根网线实现连接。
A的ifconfig参数:
eth0 Link encap:Ethernet HWaddr 00:0c:29:1c:06:3b
inet addr:202.199.118.120 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe1c:63b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3371 errors:0 dropped:0 overruns:0 frame:0
TX packets:1396 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:317963 (317.9 KB) TX bytes:152369 (152.3 KB)
Interrupt:19 Base address:0x2024
B的ifconfig参数:
eth0 Link encap:Ethernet HWaddr 00:0c:29:1c:06:3b
inet addr:202.199.118.187 Bcast:202.199.118.255 Mask:255.255.255.128
inet6 addr: fe80::ea06:88ff:feca:90ae/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3371 errors:0 dropped:0 overruns:0 frame:0
TX packets:1396 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:317963 (317.9 KB) TX bytes:152369 (152.3 KB)
Memory:8b300000-8b320000
前面尝试过修改
vi /etc/network/interfaces
auto eth0
iface eth0 inet static
address 202.199.118.120
netmask 255.255.255.0
gatway 202.199.118.12
和
vi /etc/resolv.conf
# Generated by NetworkManager
nameserver 202.199.118.1
nameserver 202.199.118.2
然后尝试成功连接过
后来机器断了次电,然后就连接不上了,小弟刚接触linux不久,弄了好久未果,求高手帮忙