Como posso criar um Loopback Local no Linux?

1

Eu preciso criar loopback local como mostrado aqui: Realizando o teste de loopback para interfaces Ethernet Fast Ethernet e Gigabit .

Trecho

Configure a Local Loopback Action

To configure a local loopback without physically connecting the transmit port to the receive port, follow these steps:

  1. In configuration mode, go to the following hierarchy level:

    [edit]

    user@host# edit interfaces interface-name (fastether-options | gigether-options)

  2. Configure the local loopback:

    [edit interfaces interface-name (fastether-options | gigether-options)]

    user@host# set loopback

    
por Alex 27.11.2014 / 12:48

1 resposta

2

Aqui está sua documentação sobre criação de interface, intitulada: Red Hat Enterprise Linux 3: Guia de Referência - Capítulo 8. Interfaces de Rede .

  1. Adicione esta linha, se ela não existir para /etc/hosts

    127.0.0.1       localhost       localhost.localdomain
    
  2. execute os seguintes comandos como root

    # ifconfig lo 127.0.0.1
    
    # route add 127.0.0.1
    
  3. Teste a interface

    # ifconfig lo
    lo    Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:3924  Metric:1
          RX packets:60 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
    
    # ping localhost
    PING localhost (127.0.0.1): 56 data bytes
    64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=0.3 ms
    64 bytes from 127.0.0.1: icmp_seq=1 ttl=255 time=0.2 ms
    64 bytes from 127.0.0.1: icmp_seq=2 ttl=255 time=0.1 ms
    64 bytes from 127.0.0.1: icmp_seq=3 ttl=255 time=0.1 ms
    64 bytes from 127.0.0.1: icmp_seq=4 ttl=255 time=0.2 ms
    64 bytes from 127.0.0.1: icmp_seq=5 ttl=255 time=0.1 ms
    
    --- localhost ping statistics ---
    6 packets transmitted, 6 packets received, 0% packet loss
    round-trip min/avg/max = 0.1/0.1/0.3 ms
    
por 27.11.2014 / 13:09