Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed explanation of network configuration steps of Centos7 bridging mode under VMware

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Complete steps of network configuration of Centos7 bridging mode under VMware virtual machine for your reference. The details are as follows

First, open the settings page of the virtual machine and set the virtual machine bridging mode as shown in the figure: select the bridging mode (optional to copy the physical network connection)

2. Configure VMware virtual machine network in bridging mode

1. View the host network information:

Ipconfig / all

Ethernet adapter local connection:

Connect a specific DNS suffix. . . . . . . Description. . . . . . . . . . . . . . . Realtek PCIe GBE Family Controller physical address. . . . . . . . . . . . . 44-37-E6-D2-D6-A5 DHCP is enabled. . . . . . . . . . . Automatic configuration is enabled. . . . . . . . . . Is the IPv4 address. . . . . . . . . . . . 192.168.0.107 (preferred) subnet mask. . . . . . . . . . . . 255.255.255.0 time to obtain the lease. . . . . . . . . The expiration of the lease at 9:16:04 on March 18, 2019. . . . . . . . . The default gateway is 5:38:07 on March 20, 2019. . . . . . . . . . . . . 192.168.0.1 DHCP server. . . . . . . . . . . 192.168.0.1 DNS server. . . . . . . . . . . NetBIOS on 192.168.0.1 192.168.0.1 TCPIP. . . . . . . : enabled

two。 Configure CentOS7, fill the corresponding information in the host into the corresponding location below, static ip, subnet mask, default gateway, DNS

Vi / etc/sysconfig/network-scripts/ifcfg-eno16777736

Description: ifcfg-eno16777736 files may vary from person to person

TYPE=EthernetBOOTPROTO=static # is modified to staticDEFROUTE=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_FAILURE_FATAL=noNAME=eno16777736UUID=bf5337ab-c044-4af7-9143-12da0d493b89DEVICE=eno16777736ONBOOT=yes # to modify the ip address of the yesPEERDNS=yesPEERROUTES=yesIPV6_PEERDNS=yesIPV6_PEERROUTES=yesIPADDR=192.168.0.200 # custom virtual machine (host is 192.168.0.107). The subnet mask must be set on the same network segment NETMASK=255.255.255.0 # as the host, GETWAY=192.168.0.1 # default gateway as the host, and DNS1=192.168.0.1 # DNS as the host Same as host ip address: set and host same IP address range ipNETMASK: subnet mask and host same GATEWAY: default gateway and host same DNS1: same as host

3. Add Gateway addr

Vi / etc/sysconfig/network

The contents are as follows:

NETWORKING=yesHOSTNAME=xxxx # whatever name GATEWAY=192.168.1.1 # default gateway is the same as the host

4. Add DNS

Vi / etc/resolv.conf

The contents are as follows:

# Generated by NetworkManagernameserver 192.168.0.1 # DNS, just like the host

5. Restart network

Service network restart

III. Testing

1. Private network accesses its own static ip

[root@localhost Desktop] # ping 192.168.0.200PING 192.168.0.200 (192.168.0.200) 56 (84) bytes of data.64 bytes from 192.168.0.200: icmp_seq=1 ttl=64 time=0.036 ms64 bytes from 192.168.0.200: icmp_seq=2 ttl=64 time=0.043 ms64 bytes from 192.168.0.200: icmp_seq=3 ttl=64 time=0.047 ms64 bytes from 192.168.0.200: icmp_seq=4 ttl=64 time=0.046 Ms ^ C-- 192.168.0.200 ping statistics-4 packets transmitted 4 received, 0% packet loss, time 2999msrtt min/avg/max/mdev = 0.036, 0.043, 0.047, 0.004 ms

two。 Access to the public network

[root@localhost Desktop] # ping www.baidu.comPING www.a.shifen.com (180.97.33.108) 56 (84) bytes of data.64 bytes from 180.97.33.108: icmp_seq=1 ttl=57 time=2.52 ms64 bytes from 180.97.33.108: icmp_seq=2 ttl=57 time=2.04 ms64 bytes from 180.97.33.108: icmp_seq=3 ttl=57 time=3.20 ms64 bytes from 180.97.33.108: icmp_seq=4 ttl=57 time=2.20 ms64 bytes from 180.97.33.108: Icmp_seq=5 ttl=57 time=3.56 ms64 bytes from 180.97.33.108: icmp_seq=6 ttl=57 time=2.08 ms64 bytes from 180.97.33.108: icmp_seq=7 ttl=57 time=2.11 ms64 bytes from 180.97.33.108: icmp_seq=8 ttl=57 time=2.37 ms64 bytes from 180.97.33.108: icmp_seq=9 ttl=57 time=2.58 ms64 bytes from 180.97.33.108: icmp_seq=10 ttl=57 time=3.61 ms64 bytes from 180.97.33.108: icmp_seq=11 ttl=57 time=3.74 ms64 bytes from 180. 97.33.108: icmp_seq=12 ttl=57 time=2.81 Ms ^ C-www.a.shifen.com ping statistics-12 packets transmitted 12 received, 0 packet loss, time 11021msrtt min/avg/max/mdev = 2.047 ms 2.738 max 3.744 max 0.609

3. Host accesses virtual machine

C:\ Users\ Administrator\ Desktop λ ping 192.168.0.200 is Ping 192.168.0.200 with 32 bytes of data: reply from 192.168.0.200: bytes = 32 time

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report