Como configurar o gateway do switch?

Complete os seguintes passos

Acompanhe o passo a passo para atribuir um endereço IP estático ao seu console Nintendo Switch:

Em um PC ou dispositivo inteligente
  1. Usando um dispositivo em sua rede (PC, laptop, dispositivo inteligente, etc.), encontre as seguintes informações da rede:
    • Endereço IP
    • Máscara de sub-rede
    • Gateway
No Nintendo Switch
  1. Em Configurações avançadas nas configurações de rede, selecione Configurações do endereço IP.
  2. Selecione Manual.

    Como configurar o gateway do switch?

  3. Selecione Endereço IP e segure o botão B para remover o endereço IP existente (ele é trocado por zeros).
  4. Digite o endereço IP que encontrou no dispositivo de rede, adicionando 20 à última seção de dígitos, e selecione OK.
    • Por exemplo, se o endereço IP exibido no seu computador for 192.168.2.5, digite 192.168.2.25 no Nintendo Switch.

      Importante: cada dispositivo na rede deve ter um endereço IP único. Se o teste de conexão falhar com o endereço IP informado, tente outro endereço IP adicionando 30, 40 e assim por diante à última sequência de dígitos.

  5. Selecione Máscara de sub-rede e segure o botão B para remover a máscara de sub-rede existente.
  6. Digite a máscara de sub-rede como exibida nas suas configurações de rede e selecione OK.
    • Para a maioria das redes, a máscara será 255.255.255.000.
  7. Selecione Gateway e segure o botão B para remover o gateway existente.
  8. Digite o gateway padrão, como exibido nas suas configurações de rede, e selecione OK.
Em um PC ou dispositivo inteligente
  1. Acesse as configurações do seu roteador.
  2. Encontre as configurações de Redirecionamento de Portas. Embora a localização possa variar conforme o roteador, ela geralmente se encontra em seções como "Firewall", "Virtual Server", "Security" ou "Applications and Gaming".
  3. No nome do aplicativo, você pode digitar qualquer coisa (Nintendo Switch, etc.)
  4. No intervalo de portas, informe as portas inicial e final a serem redirecionadas. Para o Nintendo Switch, são as portas de 1 a 65535.
  5. Selecione o protocolo UDP.
  6. Digite o endereço IP configurado anteriormente no console.
  7. Marque "Habilitar" ou "Aplicar" para ativar a regra.
  8. Salve as mudanças no roteador.

Complete os seguintes passos

Em um PC ou dispositivo inteligente
  1. Usando um dispositivo em sua rede (PC, laptop, dispositivo inteligente, etc.), encontre as seguintes informações da rede:
    • Endereço IP
    • Máscara de Sub-Rede
    • Gateway
No Nintendo Switch
  1. Em Configurações avançadas nas configurações de rede, selecione Configurações do endereço IP.
  2. Selecione Manual.

    Como configurar o gateway do switch?

  3. Selecione Endereço IP e segure o botão B para remover o endereço IP existente (ele será zerado).
  4. Digite o endereço IP que encontrou no dispositivo de rede, adicionando 20 à última seção de dígitos, e selecione OK.
    • Por exemplo, se o endereço IP exibido no seu computador for 192.168.2.5, digite 192.168.2.25 no Nintendo Switch.

      Importante: cada dispositivo na rede deve ter um endereço IP único.

  5. Selecione Máscara de sub-rede e segure o botão B para remover a máscara de sub-rede existente.
  6. Digite a máscara de sub-rede como exibida nas suas configurações de rede e selecione OK.
    • Para a maioria das redes, a máscara será 255.255.255.000.
  7. Selecione Gateway e segure o botão B para remover o gateway existente.
  8. Digite o gateway padrão, como exibido nas suas configurações de rede, e selecione OK.

    Introduction

    This document describes how to configure a default route or gateway of last resort.

    Prerequisites

    Requirements

    There are no specific requirements for this document.

    Components Used

    This document is not restricted to specific software and hardware versions. The command outputs shown were taken from a Cisco 3900 Series router with Cisco IOS®Software Release 15M.

    The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.

    Conventions

    For more information on document conventions, see theCisco Technical Tips Conventions.

    Background Information

    Default routes are used to direct packets addressed to networks not explicitly listed in the routing table. Default routes are invaluable in topologies where it is not desirable to learn all the more specific networks, as in case of stub networks, or not feasible due to limited system resources such as memory and limited resources.

    The next IP commands are used and described in more detail:

    • ip default-gateway

    • ip default-network

    • ip route 0.0.0.0 0.0.0.0

    Use Command ip default-gateway

    Theip default-gatewaycommand differs from the other two commands as it must be used only be used whenip routingis disabled on the Cisco router. For instance, if the router is a host in the IP world, you can use this command to define a default gateway for it. You can also use this command when your low end Cisco router is in boot mode in order to TFTP a Cisco IOS® Software image to the router. In boot mode, the router does not haveip routingenabled. This example defines the router on IP address 172.16.15.4 as the default route:

    ip default-gateway 172.16.15.4

    Use Command ip default-network

    Unlike theip default-gatewaycommand, you can useip default-network whenip routingis enabled on the Cisco router. When you configureip default-networkthe router considers routes to that network for installation as the gateway of last resort on the router. For every network configured withip default-network, if a router has a route to that network, that route is flagged as a candidate default route. This network diagram displays the routing table taken from router R1:

    Como configurar o gateway do switch?

    R1#show ip route
    Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
    a - application route
    + - replicated route, % - next hop override, p - overrides from PfR

    Gateway of last resort is not set

    10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
    C 10.44.192.0/24 is directly connected, GigabitEthernet0/0
    L 10.44.192.1/32 is directly connected, GigabitEthernet0/0
    C 10.108.99.0/24 is directly connected, GigabitEthernet0/1
    L 10.108.99.1/32 is directly connected, GigabitEthernet0/1
    S 192.168.1.0/24 [1/0] via 10.44.192.2

    Notice that the static route to 192.168.1.0 via 10.44.192.2 and that the gateway of last resort is not set. If you configureip default-network 192.168.1.0, the routing table changes as follows:

    R1#configure terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    R1(config)#ip default-network 192.168.1.0
    R1(config)#end
    R1#
    R1#show ip route
    Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
    a - application route
    + - replicated route, % - next hop override, p - overrides from PfR

    Gateway of last resort is 10.44.192.2 to network 192.168.1.0

    S* 0.0.0.0/0 [1/0] via 10.44.192.2
    10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
    C 10.44.192.0/24 is directly connected, GigabitEthernet0/0
    L 10.44.192.1/32 is directly connected, GigabitEthernet0/0
    C 10.108.99.0/24 is directly connected, GigabitEthernet0/1
    L 10.108.99.1/32 is directly connected, GigabitEthernet0/1
    S* 192.168.1.0/24 [1/0] via 10.44.192.2
    R1#
    R1#show ip protocols
    *** IP Routing is NSF aware ***

    Routing Protocol is "application"
    Sending updates every 0 seconds
    Invalid after 0 seconds, hold down 0, flushed after 0
    Outgoing update filter list for all interfaces is not set
    Incoming update filter list for all interfaces is not set
    Maximum path: 32
    Routing for Networks:
    Routing Information Sources:
    Gateway Distance Last Update
    Distance: (default is 4)

    R1#

    The gateway of last resort is now set as 10.44.192.2. This result is independent of any routing protocol, as shown by theshow ip protocolscommand output no routing protocol is configured. You can add another candidate default route with the configuration of another instance ofip default-network:

    R1#configure terminal
    Enter configuration commands, one per line. End with CNTL/Z.
    R1(config)#ip route 172.17.24.0 255.255.255.0 10.108.99.2
    R1(config)#ip default-network 172.17.24.0
    R1(config)#end
    R1#
    R1#show ip route
    Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
    a - application route
    + - replicated route, % - next hop override, p - overrides from PfR

    Gateway of last resort is 10.44.192.2 to network 192.168.1.0

    S* 0.0.0.0/0 [1/0] via 10.44.192.2
    10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
    C 10.44.192.0/24 is directly connected, GigabitEthernet0/0
    L 10.44.192.1/32 is directly connected, GigabitEthernet0/0
    C 10.108.99.0/24 is directly connected, GigabitEthernet0/1
    L 10.108.99.1/32 is directly connected, GigabitEthernet0/1
    172.17.0.0/16 is variably subnetted, 2 subnets, 2 masks
    S 172.17.0.0/16 [1/0] via 172.17.24.0
    S 172.17.24.0/24 [1/0] via 10.108.99.2
    S* 192.168.1.0/24 [1/0] via 10.44.192.2

    Note: After theip default-networkcommand was entered you can observe that the network was not flagged as a default network. TheFlag a Default Networksection explains the reason.

    Flag a Default Network

    Theip default-networkcommand is classful, this means that if the router has a route to the subnet indicated by this command, it installs the route to the major network. At this point neither network has been flagged as the default route. Theip default-networkcommand must be run again, this time with the use of the major network in order to flag the candidate as a default route.

    R1#configure terminal 
    Enter configuration commands, one per line. End with CNTL/Z.
    R1(config)#ip default-network 172.17.0.0
    R1(config)#end
    R1#sh
    *Jul 15 22:32:42.829: %SYS-5-CONFIG_I: Configured from console by conso

    R1#show ip route
    Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
    a - application route
    + - replicated route, % - next hop override, p - overrides from PfR

    Gateway of last resort is 172.17.24.0 to network 172.17.0.0

    S* 0.0.0.0/0 [1/0] via 172.17.24.0
    10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
    C 10.44.192.0/24 is directly connected, GigabitEthernet0/0
    L 10.44.192.1/32 is directly connected, GigabitEthernet0/0
    C 10.108.99.0/24 is directly connected, GigabitEthernet0/1
    L 10.108.99.1/32 is directly connected, GigabitEthernet0/1
    * 172.17.0.0/16 is variably subnetted, 2 subnets, 2 masks
    S* 172.17.0.0/16 [1/0] via 172.17.24.0
    S 172.17.24.0/24 [1/0] via 10.108.99.2
    S* 192.168.1.0/24 [1/0] via 10.44.192.2

    If the original static route had been configured to the major network, the previous step would not have been necessary.

    There are still no IP Protocols configured in the router, without any dynamic protocols you can configure your router to choose from a number of candidate default routes based on whether the routing table has routes to networks other than 0.0.0.0/0. Theip default-networkcommand allows you to configure robustness into the selection of a gateway of last resort. Rather than the use of static routes to specific next-hops, you can have the router choose a default route to a particular network based in the routing table information.

    If you lose the route to a particular network, the router selects the other candidate default. In that scenario, you can then remove the lost route from the configuration as shown in the next output:

    R1#configure terminal 
    Enter configuration commands, one per line. End with CNTL/Z.
    R1(config)#no ip route 172.17.24.0 255.255.255.0 10.108.99.2
    R1(config)#end
    *Jul 15 22:52:59.047: %SYS-5-CONFIG_I: Configured from console by console

    After you remove the static route to the network, the routing table looks like this:

    R1#show ip route
    Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
    a - application route
    + - replicated route, % - next hop override, p - overrides from PfR

    Gateway of last resort is 10.44.192.2 to network 192.168.1.0

    S* 0.0.0.0/0 [1/0] via 10.44.192.2
    10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
    C 10.44.192.0/24 is directly connected, GigabitEthernet0/0
    L 10.44.192.1/32 is directly connected, GigabitEthernet0/0
    C 10.108.99.0/24 is directly connected, GigabitEthernet0/1
    L 10.108.99.1/32 is directly connected, GigabitEthernet0/1
    S* 192.168.1.0/24 [1/0] via 10.44.192.2
    R1#

    Use Different Routing Protocols

    Gateways of last resort selected via theip default-networkcommand are propagated differently based on which routing protocol is used. For EIGRP there are different methods to Configure a Default Route in EIGRP which are preferred. The default route announced with theip default-networkcommand is not propagated by Open Shortest Path First (OSPF) or by Intermediate System-to-Intermediate System (IS-IS). For more detailed information on behavior of default routes with OSPF, refer toHow Does OSPF Generate Default Routes?.

    Use Command ip route 0.0.0.0 0.0.0.0

    A static route configured with the command ip route 0.0.0.0 0.0.0.0 is another way to set the gateway of last resort on a router. As with theip default-networkcommand, the use of the static route to 0.0.0.0 is not dependent on any routing protocols. However,ip routingmust be enabled on the router.

    Note: EIGRP propagates a route to network 0.0.0.0, but the static route must be redistributed into the routing protocol.

    In earlier versions of RIP, the default route created through theip route 0.0.0.0 0.0.0.0was automatically advertised by RIP routers. In Cisco IOS Software Release 12 and later, RIP does not advertise the default route if the route is not learned via RIP. It can be necessary to redistribute the route into RIP.

    The default routes configured with theip route 0.0.0.0 0.0.0.0command are not propagated by OSPF and IS-IS. Additionally, this default route cannot be redistributed into OSPF or IS-IS through theredistributecommand. Use the default-information originate command to generate a default route into an IS-IS or OSPF routing domain. For more detailed information about the behavior of default routes with OSPF, please refer toHow Does OSPF Generate Default Routes?. The next output is an example on how to configure a gateway of last resort with the use of theip route 0.0.0.0 0.0.0.0command:

    R1#configure terminal 
    Enter configuration commands, one per line. End with CNTL/Z.
    R1(config)#ip route 0.0.0.0 0.0.0.0 10.108.99.2
    R1(config)#end
    R1#
    R1#show ip route
    Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
    D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    E1 - OSPF external type 1, E2 - OSPF external type 2
    i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
    ia - IS-IS inter area, * - candidate default, U - per-user static route
    o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
    a - application route
    + - replicated route, % - next hop override, p - overrides from PfR

    Gateway of last resort is 10.108.99.2 to network 0.0.0.0

    S* 0.0.0.0/0 [1/0] via 10.108.99.2
    10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
    C 10.44.192.0/24 is directly connected, GigabitEthernet0/0
    L 10.44.192.1/32 is directly connected, GigabitEthernet0/0
    C 10.108.99.0/24 is directly connected, GigabitEthernet0/1
    L 10.108.99.1/32 is directly connected, GigabitEthernet0/1
    D 192.168.1.0/24 [90/130816] via 10.44.192.2, 00:20:24, GigabitEthernet0/0
    R1#show ip route 0.0.0.0 0.0.0.0
    Routing entry for 0.0.0.0/0, supernet
    Known via "static", distance 1, metric 0, candidate default path
    Routing Descriptor Blocks:
    * 10.108.99.2
    Route metric is 0, traffic share count is 1

    Note:If you configure multiple networks as candidate default routes via theip default-networkcommand, the network that has the lowest administrative distance is chosen as the network for the gateway of last resort. If all the networks have the same administrative distance then the network listed first in the routing table is chosen as the network for the gateway of last resort. If you use both theip default-networkandip route 0.0.0.0 0.0.0.0commands to configure candidate default networks theip route 0.0.0.0 0.0.0.0command, takes precedence and is chosen for the gateway of last resort. If you use multipleip route 0.0.0.0 0.0.0.0commands to configure a default route, traffic is load-balanced over the multiple routes.

    Summary

    Use theip default-gatewaycommand whenip routingis disabled on a Cisco router. Use theip default-networkorip route 0.0.0.0 0.0.0.0commands to set the gateway of last resort on Cisco routers that haveip routingenabled. The way in which routing protocols propagate the default route information varies for each protocol.

    • IP Routed Protocols Technology Support Page
    • Technical Support - Cisco Systems

    Como colocar gateway no switch?

    Para configurar um gateway padrão IPv4 em um switch, use o comando de configuração global ip default-gateway ip-address. O endereço IP configurado é o endereço IPv4 da interface do roteador local conectado ao switch. A figura mostra um administrador estabelecendo uma conexão remota com o switch S1 em outra rede.

    Como saber o gateway do switch?

    Para isso é preciso acessar o equipamento através da porta console e digitar o comando "show ip address". Segue manual de linhas de comando do equipamento. Nos colocamos a disposição. Este é o seu espaço para se conectar com outros e compartilhar conhecimento.

    Como configurar uma rede gateway?

    Para configurar um gateway padrão Abra Conexões de rede. Clique na conexão de rede local que você deseja configurar e, em Tarefas de rede, clique em Alterar as configurações desta conexão. Na guia Geral, em Esta conexão usa estes itens, clique em Protocolo Internet (TCP/IP) e, em seguida, clique em Propriedades.

    O que é switch gateway?

    Em outras palavras, o switch divide o domínio de colisão dos hosts. 2. Gateway: Gateway é uma passagem para conectar duas redes juntas que podem funcionar em diferentes modelos de rede.