桥接
[root@localhost ~]# history 1 cd etc 2 cd /etc 3 ll 4 cd network 5 service network restart 6 Vim /etc/sysconfig/network-scripts/ifcfg-eth0 7 vim /etc/sysconfig/network-scripts/ifcfg-eth0 8 vim /etc/udev/rules.d/70-persistent-net.rules 9 service network restart 10 vim /etc/resolv.conf 11 service network restart 12 ping www.baidu.com 13 ifconfig 14 vim /etc/udev/rules.d/70-persistent-net.rules 15 ll 16 ping www.baidu.com 17 r 18 route 19 ifconfig -a 20 cat /etc/resolv.conf 21 cat /etc/hosts 22 service network restart 23 ifconfig 24 cat /etc/sysconfig/network-scripts/ifcfg-eth0 25 vim /etc/sysconfig/network-scripts/ifcfg-eth0 26 service network restart 27 ifconfig 28 cat /etc/networks 29 cat /etc/sysconfig/network 30 reboot 31 ll 32 ping www.baidu.com 33 exit 34 history [root@localhost ~]#
DEVICE="eth0" BOOTPROTO="static" IPV6INIT="no" NM_CONTROLLED="yes" ONBOOT=yes TYPE="Ethernet" IPADDR=192.168.1.149 GATEWAY=192.168.1.1 DNS1=202.96.134.133 DNS2=202.96.128.166 UUID="566c51c8-8040-4eeb-b199-da30f0497f90" DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6_AUTOCONF=no IPV6_DEFROUTE=no IPV6_FAILURE_FATAL=no NAME="System eth0" HWADDR=00:0C:29:9E:3E:19 NETWORKING="yes" ARPCHECK="no" ~ ~ "/etc/sysconfig/network-scripts/ifcfg-eth0" 21L, 387C
# This file was automatically generated by the /lib/udev/write_net_rules # program, run by the persistent-net-generator.rules rules file. # # You can modify it, as long as you keep each rule on a single # line, and change only the value of the NAME= key. # PCI device 0x1022:0x2000 (pcnet32) PEERDNS=yes PEERROUTES=yes IPADDR=192.168.1.150 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 # PCI device 0x1022:0x2000 (vmxnet) (custom name provided by external tool) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:9e:3e:19", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" ~ ~ ~ ~ ~ ~ ~ "/etc/udev/rules.d/70-persistent-net.rules" 15L, 589C 15,1 All
# Generated by NetworkManager nameserver 202.96.134.133 nameserver 202.96.128.166 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/resolv.conf" 3L, 82C 3,1 All
C:\Users\Administrator\Documents\Virtual Machines