Vyatta – DHCP client, IP address, MAC address, Static routing, DNS client

DHCP client

set interfaces ethernet eth0 address dhcp
commit
 
root@vyatta# sudo su
[edit]
 
root@vyatta# renew dhcp interface eth0
Renewing DHCP lease on eth0
[edit]
vyatta@vyatta:~$ show interfaces
Interface    IP Address         State       Link   Description
eth0         172.16.10.68/24    up          up
eth1         -                  up          up
lo           127.0.0.1/8        up          up
lo           ::1/128            up          up

IP address

set interfaces ethernet eth0 address 192.168.88.200/24
set interfaces ethernet eth0 description "home LAN"
set interfaces ethernet eth1 address 10.18.5.3/24
set interfaces ethernet eth1 description "home WAN"
commit
 
root@vyatta# show interfaces
 ethernet eth0 {
     address 192.168.88.200/24
     description "home LAN"
     hw-id 08:00:27:34:d9:29
 }
 ethernet eth1 {
     address 10.18.5.3/24
     description "home WAN"
     hw-id 08:00:27:7e:60:9c
 }
 loopback lo {
 }
[edit]

Delete ip address

delete interfaces ethernet eth1 address 10.18.5.3/24

Change MAC address

set interfaces ethernet eth0 mac 00:0C:42:54:F4:CB

Static routing

set system gateway-address 10.18.5.254
set protocols static route 212.233.128.0/17 next-hop 10.18.5.1
set protocols static route 10.0.0.0/8 next-hop 10.18.5.1

DNS client

root@vyatta# set system name-server 93.155.131.1
[edit]
root@vyatta# set system name-server 93.155.130.4
[edit]
 
vyatta@core2# ping dir.bg
PING dir.bg (194.145.63.12) 56(84) bytes of data.
64 bytes from dir.bg (194.145.63.12): icmp_seq=1 ttl=61 time=11.5 ms
64 bytes from dir.bg (194.145.63.12): icmp_seq=2 ttl=61 time=3.80 ms
64 bytes from dir.bg (194.145.63.12): icmp_seq=3 ttl=61 time=5.77 ms
64 bytes from dir.bg (194.145.63.12): icmp_seq=4 ttl=61 time=3.99 ms
^C
--- dir.bg ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3011ms
rtt min/avg/max/mdev = 3.803/6.288/11.581/3.152 ms
[edit]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.