configurar rede linux com comando ip

Listar interfaces de rede

ip addr

Listar IPs IPV4 das interfaces de rede

ip -4 addr

Configurar IP a interface de rede

ip addr add 192.168.0.7/24 dev eth0

Habilitar interface de rede

ip link set eth0 up

Desabilitar interface de rede

ip link set eth0 down

Remover IP de interface de rede

ip addr del 192.168.0.7/24 dev eth0

Ver tabela de roteamento

ip route

Adicionar default gateway

ip route add default via 192.168.0.254

Adicionar rota de rede

ip route add 10.10.3.0/24 via 192.168.5.100 dev eth0

Remover rota de rede

ip route del 10.10.3.0/24
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s