...
Note |
---|
title | IPv6 default gateway |
---|
|
At this moment we do not support the default gateway for IPv6. |
After the zone booted we will see in the zone console:
Code Block |
---|
|
[NOTICE: Zone booting up]
DilOS Version 2.0.2.94 64-bit
Copyright 2011-2022, DilOS. All rights reserved.
Hostname: ltest01
DilOS 2.0.2 \n \l
ltest01 console login: root
Password:
Last login: Tue Jan 11 17:45:59 MSK 2022 on console
/* skipped */
root@ltest01:~# ifconfig
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
vnic0: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 2
inet 192.168.0.136 netmask ffffff00 broadcast 192.168.0.255
ether 2:8:20:35:a5:4f
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
inet6 ::1/128
vnic0: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
inet6 fe80::8:20ff:fe35:a54f/10
ether 2:8:20:35:a5:4f
vnic0:1: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
inet6 2001:b08:4:4::10/64
vnic0:2: flags=2080841<UP,RUNNING,MULTICAST,ADDRCONF,IPv6> mtu 1500 index 2
inet6 2001:b08:4:4:8:20ff:fe35:a54f/64
|
Code Block |
---|
title | Inspect the routing table |
---|
|
root@ltest01:~# netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 192.168.0.1 UG 1 0 vnic0
127.0.0.1 127.0.0.1 UH 2 0 lo0
192.168.0.0 192.168.0.136 U 3 9 vnic0
Routing Table: IPv6
Destination/Mask Gateway Flags Ref Use If
--------------------------- --------------------------- ----- --- ------- -----
::1 ::1 UH 2 0 lo0
2001:b08:4:4::/64 2001:b08:4:4:8:20ff:fe35:a54f U 3 2 vnic0
2001:b08:4:4::/64 2001:b08:4:4::10 U 2 0 vnic0
fe80::/10 fe80::8:20ff:fe35:a54f U 3 2 vnic0
default fe80::8:20ff:fee0:cb3e UG 2 1 vnic0
|
Code Block |
---|
title | Add a static default gateway for IPv6 network |
---|
|
root@ltest01:~# route -p add -inet6 default 2001:b08:4:4::2
add net default: gateway 2001:b08:4:4::2
add persistent net default: gateway 2001:b08:4:4::2
root@ltest01:~# netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 192.168.0.1 UG 1 0 vnic0
127.0.0.1 127.0.0.1 UH 2 0 lo0
192.168.0.0 192.168.0.136 U 3 9 vnic0
Routing Table: IPv6
Destination/Mask Gateway Flags Ref Use If
--------------------------- --------------------------- ----- --- ------- -----
::1 ::1 UH 2 0 lo0
2001:b08:4:4::/64 2001:b08:4:4:8:20ff:fe35:a54f U 3 2 vnic0
2001:b08:4:4::/64 2001:b08:4:4::10 U 2 0 vnic0
fe80::/10 fe80::8:20ff:fe35:a54f U 3 2 vnic0
default 2001:b08:4:4::2 UG 1 0
default fe80::8:20ff:fee0:cb3e UG 2 1 vnic0
|
Code Block |
---|
title | Ping something to test IPv6 |
---|
|
root@ltest01:~# ping ipv6.google.com
ipv6.google.com is alive
|
Also, if you have an IPv6 DNS server you can add it to the resolvers attributes:
Code Block |
---|
|
zonecfg:ltest01> add attr
zonecfg:ltest01:attr> set name=resolvers
zonecfg:ltest01:attr> set type=string
zonecfg:ltest01:attr> set value="192.168.0.1,2001:b08:4:4::2"
zonecfg:ltest01:attr> end |
Code Block |
---|
title | /etc/resolv.conf result |
---|
|
root@ltest01:~# cat /etc/resolv.conf
# AUTOMATIC ZONE CONFIG
nameserver 192.168.0.1
nameserver 2001:b08:4:4::2
root@ltest01:~# host ipv6.google.com 2001:b08:4:4::2
Using domain server:
Name: 2001:b08:4:4::2
Address: 2001:b08:4:4::2#53
Aliases:
ipv6.google.com is an alias for ipv6.l.google.com.
ipv6.l.google.com has IPv6 address 2a00:1450:4010:c1e::65
ipv6.l.google.com has IPv6 address 2a00:1450:4010:c1e::71
ipv6.l.google.com has IPv6 address 2a00:1450:4010:c1e::64
ipv6.l.google.com has IPv6 address 2a00:1450:4010:c1e::8a
|
Another new feature in a non-global zone is a default domain. It is used to resolve local resources, for example:
Code Block |
---|
title | resolve local resources |
---|
|
root@ltest01:~# host ns
Host ns not found: 3(NXDOMAIN)
|
Our resolver does not know the default domain. Let's configure it for the zone:
Code Block |
---|
|
zonecfg:ltest01> add attr
zonecfg:ltest01:attr> set name=domain
zonecfg:ltest01:attr> set type=string
zonecfg:ltest01:attr> set value="loc"
zonecfg:ltest01:attr> end
|
Boot the zone (see below) and login, let's test the resolver again:
Code Block |
---|
title | resolve local resource |
---|
|
root@ltest01:~# host ns
ns.loc has address 192.168.0.1
ns.loc has address 192.168.1.1
ns.loc has IPv6 address 2001:b08:4:4::2
ns.loc has IPv6 address 2001:b08:4:4::1
root@ltest01:~# cat /etc/resolv.conf
# AUTOMATIC ZONE CONFIG
nameserver 192.168.0.1
nameserver 2001:b08:4:4::2
domain loc |
End of 2.0.2.94 features update
...
Code Block |
---|
zoneadm -z t4 install |
...