{"id":55,"date":"2022-12-25T06:17:45","date_gmt":"2022-12-25T06:17:45","guid":{"rendered":"https:\/\/tecno-experts.com\/fransilvablog\/?p=55"},"modified":"2022-12-25T06:17:45","modified_gmt":"2022-12-25T06:17:45","slug":"configurando-switches-virtuales-usando-linea-de-comandos-parte-2","status":"publish","type":"post","link":"https:\/\/tecno-experts.com\/fransilvablog\/vmware\/configurando-switches-virtuales-usando-linea-de-comandos-parte-2\/","title":{"rendered":"Configurando switches virtuales usando l\u00ednea de comandos &#8211; PARTE 2"},"content":{"rendered":"<p><span style=\"font-family: arial, helvetica, sans-serif; font-size: 12pt;\"><img decoding=\"async\" style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/tecno-experts.com\/fransilvablog\/wp-content\/uploads\/fransilvablog\/images\/articulos\/2021-05-04_00h16_25.png\" \/><\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\">Hola en este nuevo post vamos a dar continuaci\u00f3n al post anterior (<a href=\"https:\/\/tecno-experts.com\/fransilvablog\/vmware\/configurando-switches-virtuales-usando-l\u00ednea-de-comandos\/\">post<\/a>). Se har\u00e1 una configuraci\u00f3n de nics y vmknics para la recuperaci\u00f3n de la red de administraci\u00f3n en uno de los nodos ESXi que dej\u00f3 de comunicarse a partir de una actualizaci\u00f3n a vSphere 7.0U2. <a href=\"https:\/\/kb.vmware.com\/s\/article\/84148\">KB84148<\/a>.\u00a0<\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\">La cuasa de este problema es relacionado a que uno o varias interfaces VMKERNEL pueden encontrar en un error durante la fase de jumpstart lo que provoca que las interfaces no se restauren. La soluci\u00f3n es colocar la version <strong>vSphere 7.0U3d<\/strong><\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\"><strong>Workaround,<\/strong> para poder tener gesti\u00f3n al ESXi debemos tener acceso al DCUI, habl\u00e9 en un post anterior sobre como entrar a modo comandos.\u00a0<a href=\"https:\/\/tecno-experts.com\/fransilvablog\/vmware\/gesti\u00f3n-de-vms-desde-el-modo-comandos-de-esxi\/\">Aqu\u00ed<\/a>. Luego de ello debemos conocer los comandos \u00fatiles que ayudar\u00e1n a la gesti\u00f3n y configuraci\u00f3n de las redes virtuales.<\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\"><strong>Identificaci\u00f3n de vSwitch<\/strong><\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\">Luego de identificar el vSwitch que ten\u00eda la configuraci\u00f3n de la red de administraci\u00f3n del hosts usando el comando esxcfg-vswitch podemos detectar que no tiene NICs ni VMKNICs conectados.<\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\">\u00a0<img decoding=\"async\" style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/tecno-experts.com\/fransilvablog\/wp-content\/uploads\/fransilvablog\/images\/migrated-inline\/article-58-01.png\" \/><\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\">\u00a0<strong>Crear nuevo portgroup virtual y agregar la tarjeta de red<\/strong><\/span><\/p>\n<pre class=\"language-markup\"><code>esxcli network vswitch standard portgroup add --portgroup-name=&lt;name&gt; --vswitch-name=&lt;vSwitch_name&gt;<\/code><\/pre>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\">El comando anterior crea un nuevo portgroup donde va a ser configurado la red de administraci\u00f3n del host ESXi.<\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\">Si la red de administraci\u00f3n tiene tagueado una VLAN; se coloca la configuraci\u00f3n de la VLAN usando el comando:<\/span><\/p>\n<pre class=\"language-markup\"><code>esxcli network vswitch standard portgroup set -p &lt;pg_name&gt; --vlan-id=&lt;VLAN_ID&gt;<\/code><\/pre>\n<p><span style=\"font-family: arial, helvetica, sans-serif; color: #333333; font-size: 12pt;\">Y para agregar la tarjeta de red disponible al vSwitch se usa el siguiente comando:<\/span><\/p>\n<pre class=\"language-markup\"><code>esxcli network vswitch standard uplink add --uplink-name=&lt;vmnic0&gt; --vswitch-name=&lt;vSwitch_name&gt;<\/code><\/pre>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\"><img decoding=\"async\" style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/tecno-experts.com\/fransilvablog\/wp-content\/uploads\/fransilvablog\/images\/migrated-inline\/article-58-02.png\" \/><\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\">En el ejemplo, el portgroup destinado para administraci\u00f3n del Host es\u00a0<strong>mgmt<\/strong>\u00a0y la nic\u00a0<strong>vmnic0<\/strong>, y la red no tiene configurado un\u00a0<strong>VLAN ID<\/strong><\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\"><strong>Creaci\u00f3n de un nuevo VMKERNEL<\/strong><\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\">Luego de tener listo el vSwitch, el portgroup y la tarjeta de red f\u00edsica configurada, debemos crear el puerto de kernel que tomar\u00e1 la configuraci\u00f3n de red del host ESXi. Usamos el siguiente comando:<\/span><\/p>\n<pre class=\"language-markup\"><code>esxcli network ip interface add --interface-name=&lt;vmkX&gt; --portgroup-name=&lt;pg_name&gt;<\/code><\/pre>\n<p><span style=\"font-family: arial, helvetica, sans-serif; color: #333333; font-size: 12pt;\">Revisamos que se cree un nuevo VMKERNEL, va a crear autom\u00e1ticamente dos puertos de kernel, uno para IPv4 y otro para IPv6.<\/span><\/p>\n<p><span style=\"font-size: 12pt; font-family: arial, helvetica, sans-serif;\"><img decoding=\"async\" style=\"display: block; margin-left: auto; margin-right: auto;\" src=\"https:\/\/tecno-experts.com\/fransilvablog\/wp-content\/uploads\/fransilvablog\/images\/migrated-inline\/article-58-03.png\" \/><\/span><\/p>\n<p><span style=\"font-family: arial, helvetica, sans-serif; color: #333333; font-size: 12pt;\">Observamos que no tienen configuraci\u00f3n de direccionamiento IP, para configurar las direcciones IP, m\u00e1scara de red y tipo (est\u00e1tica o DHCP). El Comando que realiza esta configuraci\u00f3n es:<\/span><\/p>\n<pre class=\"language-markup\"><code>esxcli network ip interface ipv4 set --interface-name=&lt;vmkX&gt; --ipv4=&lt;Direccion_IP&gt; --netmask=&lt;mascara_red&gt; --type=static<\/code><\/pre>\n<p><span style=\"font-family: arial, helvetica, sans-serif; color: #333333; font-size: 12pt;\"><strong>Finalmente,<\/strong> se cuenta con conectividad de red al servidor ESXi, solventando el inconveniente. Se recomienda realizar validaci\u00f3n previa de las versiones a instalar para evitar los errores conocidos.\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hola en este nuevo post vamos a dar continuaci\u00f3n al post anterior (post). Se har\u00e1 una configuraci\u00f3n de nics y vmknics para la recuperaci\u00f3n de la red de [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":38,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[34,8,57,9,37,24,56,53],"class_list":["post-55","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vmware","tag-esxcli","tag-mantenimiento","tag-nic","tag-tecnologia","tag-troubleshooting","tag-upgrade","tag-vmknic","tag-vswitch"],"_links":{"self":[{"href":"https:\/\/tecno-experts.com\/fransilvablog\/wp-json\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tecno-experts.com\/fransilvablog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tecno-experts.com\/fransilvablog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tecno-experts.com\/fransilvablog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tecno-experts.com\/fransilvablog\/wp-json\/wp\/v2\/comments?post=55"}],"version-history":[{"count":0,"href":"https:\/\/tecno-experts.com\/fransilvablog\/wp-json\/wp\/v2\/posts\/55\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tecno-experts.com\/fransilvablog\/wp-json\/wp\/v2\/media\/38"}],"wp:attachment":[{"href":"https:\/\/tecno-experts.com\/fransilvablog\/wp-json\/wp\/v2\/media?parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tecno-experts.com\/fransilvablog\/wp-json\/wp\/v2\/categories?post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tecno-experts.com\/fransilvablog\/wp-json\/wp\/v2\/tags?post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}