Digerleri

Vmware Esx Host – Network Yapılandırması

How to configure networking from the Service Console command line


How can I get networking back up for my ESX Server host when I have access only to the service console?



  1. Ensure the network adapter you want to use is currently connected

    [root@server root]# esxcfg-nics –l
    Name    PCI      Driver      Link Speed    Duplex Description
    vmnic0  06:00.00 tg3         Up   1000Mbps Full   Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet
    vmnic1  07:00.00 tg3         Up   1000Mbps Full   Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet

    Up indicates that the network adapter is available and functioning. 


  1. List the current virtual switches

    [root@server root]# esxcfg-vswitch –l
    Switch Name    Num Ports   Used Ports  Configured Ports  Uplinks
    vSwitch0       32          3           32                vmnic0

      PortGroup Name      Internal ID    VLAN ID  Used Ports  Uplinks
      VM Network          portgroup2     0        0           vmnic0

    In the above example, there exists a virtual machine network named “VM Network” and no Service Console portgroup. For illustration, we will create a new virtual switch and place the service console portgroup on it.

  2. Create a new virtual switch:

    [root@server root]# esxcfg-vswitch –a vSwitch1

  3. Create the Service Console portgroup on this new virtual switch:

    [root@server root]# esxcfg-vswitch –A “Service Console” vSwitch1

    Because there is a space in the name we chose (Service Console), we must enclose it in quotation marks.

  4. Uplink vmnic1 to the new virtual switch:

    [root@server root]# esxcfg-vswitch –L vmnic1 vSwitch1

  5. If you need to assign a VLAN, use the command:

    [root@server root]# esxcfg-vswitch -v <VLAN> -p “Service Console” vSwitch0

    where <VLANID> is the VLAN number. A zero here specifies no VLAN.

  6. Verify the new virtual switch configuration:

    [root@server root]# esxcfg-vswitch –l

    Switch Name    Num Ports   Used Ports  Configured Ports  Uplinks
    vSwitch0       32          3           32                vmnic0

      PortGroup Name      Internal ID    VLAN ID  Used Ports  Uplinks
      Service Console     portgroup5     0        1           vmnic0

    Switch Name    Num Ports   Used Ports  Configured Ports  Uplinks
    vSwitch1       64          1           64                vmnic1

      PortGroup Name      Internal ID    VLAN ID  Used Ports  Uplinks
      Service Console     portgroup14    0        1           vmnic1

  7. Create the vswif (Service Console) interface. For example:

    [root@server root]# esxcfg-vswif –a vswif0 –i 192.168.1.10 –n 255.255.255.0 –p “Service Console”
    [‘Vnic’ warning] Generated New Mac address, 00:50:xx:xx:xx:xx for vswif0

    Nothing to flush.

  8. Verify the configuration:

    [root@esx]# esxcfg-vswif –l
    Name    Port Group       IP Address    Netmask  Broadcast Enabled  DHCP
    vswif0  Service Console 192.168.1.10  255.255.255.0    192.168.1.255  true      false

 


 


Verifying ESX Server host networking configuration on the service console


 


To verify the current networking configuration is valid and correct:



  1. Verify the format and content of /etc/hosts.

    The hosts file is expected to have the following format:

    127.0.0.1       localhost.localdomain localhost
    192.168.1.10    server.domain.com server

  2. Verify the contents of /etc/sysconfig/network. Confirm that the proper values for your environment exist for the fully qualified hostname and gateway. Consult your network administrator if you are unsure. For example:

    NETWORKING=yes
    HOSTNAME=server.domain.com
    GATEWAY=192.168.1.1
    GATEWAYDEV=vswif0

  3. Verify that /etc/sysconfig/network-scripts/ifcfg-vswif0 has the correct settings for IP address (IPADDR), subnet mask (NETMASK), and network (NETWORK). Consult your network administrator if you are unsure. For example:

    DEVICE=vswif0
    BOOTPROTO=static
    BROADCAST=192.168.1.255
    IPADDR=192.168.1.10
    NETMASK=255.255.255.0
    NETWORK=192.168.1.0
    ONBOOT=yes
    PORTGROUP=”Service Console”
    MACADDR=00:50:56:4a:66:ba

  4. Run the following command to display the routing table:

    [root@server root]# route –n

    You will see output similar to the following:

    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 vswif0
    169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 vswif0
    0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 vswif0

    Ensure that the second column of the row flagged with UG matches the gateway address for your environment.

  5. Verify the DNS information in /etc/resolv.conf is correct for your environment.

    search domain.com
    nameserver 192.168.1.2
    nameserver 192.168.1.3

  6. Verify network connectivity between systems

Note: Changes to the network and ifcfg-vswif0 files require a restart of the network service. Type the following command and press Enter to restart the network service:


 


[root@server root]# service network restart


 


 


 


Testing network connectivity with the Ping command


Testing with Ping from a Windows Host


To initiate a ping test from a Windows host:



  1. Click Start>Run.

  2. Type cmd in the run field.

  3. Click OK.

  4. In the command prompt window, type ping <server>, where <server> is the hostname or IP address of the server that you want to ping.

  5. Press Enter.

A successful ping response is similar to the following: 


 


C:\>ping server


 


Pinging server with 32 bytes of data:


 


Reply from server: bytes=32 time<1ms TTL=64
Reply from server: bytes=32 time<1ms TTL=64
Reply from server: bytes=32 time<1ms TTL=64
Reply from server: bytes=32 time<1ms TTL=64


 


Ping statistics for server:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms


 


C:\>


 


An unsuccessful ping response is similar to the following:


 


C:\>ping server


 


Pinging server with 32 bytes of data:


 


Request timed out.
Request timed out.
Request timed out.
Request timed out.


 


Ping statistics for server:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),


 


C:\>


 


Note: If you do not see a response when pinging by the hostname of the server, initiate a ping to the IP address. Initiating a ping to the IP address allows you to determine if the problem is a result of an issue with hostname resolution.


 


Testing with Ping from a Linux Host


To initiate a ping test from a Linux host:



  1. Open a Terminal to the Linux command shell.

  2. In the command shell window type ping <server>, where <server> is the hostname or IP address of the server that you want to ping.

  3. Press Enter.

    Note: To stop the ping, press Ctrl + C.

A successful ping response is similar to the following: 


 


[root@server]$ ping server
PING server (10.0.0.1) 56(84) bytes of data.
64 bytes from server (10.0.0.1): icmp_seq=0 ttl=64 time=0.025 ms
64 bytes from server (10.0.0.1): icmp_seq=1 ttl=64 time=0.029 ms
64 bytes from server (10.0.0.1): icmp_seq=2 ttl=64 time=0.032 ms
64 bytes from server (10.0.0.1): icmp_seq=3 ttl=64 time=0.028 ms


— server ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 3092ms
rtt min/avg/max/mdev = 0.025/0.028/0.032/0.005 ms, pipe 2
[root@server]$


 


An unsuccessful ping response is similar to the following:


 


[root@server]$ ping server
PING server (10.0.0.1) 56(84) bytes of data.


 


— server ping statistics —
4 packets transmitted, 0 received, 100% packet loss, time 3017ms


[root@server]$


 


Note: If you do not see a response when pinging by the hostname of the server, initiate a ping to the IP address. Initiating a ping to the IP address allows you to determine if the problem is a result of an issue with hostname resolution.


 


Testing with Ping from an ESX Server Console


To initiate a ping test from the console of an ESX Server host:



  1. Press Alt + F1 to access the ESX Server login prompt.

  2. Login to the ESX Server as root.

  3. In the command shell type ping <server>, where <server> is the hostname or IP address of the server that you want to ping.

  4. Press Enter.

    Note: To stop the ping, press Ctrl + C.

A successful ping response is similar to the following: 


 


[root@server]$ ping server
PING server (10.0.0.1) 56(84) bytes of data.
64 bytes from server (10.0.0.1): icmp_seq=0 ttl=64 time=0.025 ms
64 bytes from server (10.0.0.1): icmp_seq=1 ttl=64 time=0.029 ms
64 bytes from server (10.0.0.1): icmp_seq=2 ttl=64 time=0.032 ms
64 bytes from server (10.0.0.1): icmp_seq=3 ttl=64 time=0.028 ms


— server ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 3092ms
rtt min/avg/max/mdev = 0.025/0.028/0.032/0.005 ms, pipe 2
[root@server]$


 


An unsuccessful ping response is similar to the following:


 


[root@server]$ ping server
PING server (10.0.0.1) 56(84) bytes of data.


 


— server ping statistics —
4 packets transmitted, 0 received, 100% packet loss, time 3017ms


[root@server]$


 


Note: If you do not see a response when pinging by the hostname of the server, initiate a ping to the IP address. Initiating a ping to the IP address allows you to determine if the problem is a result of an issue with hostname resolution.


 


 

0 0 votes
Makaleyi Oylamayı Unutmayın !

Tayfun DEĞER

Bu yazı blog üzerinde Tayfun DEĞER tarafından paylaşılmıştır. 2009 yılında açılan blog kısa zaman içerisinde büyük bir izleyici kitlesine sahip olmuştur. Tayfun DEĞER danışmanlık ve eğitimler vermektedir. vExpert 2013-2019, VCP4/5/6, VCP5-DT, VCP-Cloud ve MCSE sertifikalarına sahiptir.Twitter 'dan @tayfundeger veya RSS ile sitedeki değişiklikleri takip edebilirsiniz.

İlgili Makaleler

Subscribe
Bildir
guest

0 Yorum
Inline Feedbacks
View all comments
Başa dön tuşu
0
Görüşlerini belirtmek ister misin?x