toreanderson/clatd

Question

jaseermohammed opened this issue · 4 comments

Hi,

I'm Starting the clatd and output of the command appears as below.

[root@localhost clatd]# clatd
Configuration successfully read, dumping it:
clat-dev=eth2
clat-v4-addr=192.170.1.182
clat-v6-addr=3ffe::101/64
cmd-ip=ip
cmd-ip6tables=ip6tables
cmd-tayga=tayga
debug=2
dns64-servers=2ffe::10.102.218.110
forwarding-enable=1
ip6tables-enable=
plat-dev=
plat-prefix=2ffe::/96
proxynd-enable=1
quiet=1
script-down=
script-up=
tayga-conffile=
tayga-v4-addr=192.0.0.2
v4-conncheck-delay=10
v4-conncheck-enable=1
v4-defaultroute-advmss=0
v4-defaultroute-enable=1
v4-defaultroute-metric=2048
v4-defaultroute-mtu=1260
v4-defaultroute-replace=0
get_plat_dev(): finding which network dev faces the PLAT
cfg(plat-prefix)
cfg(cmd-ip)
get_plat_dev(): Found PLAT-facing device: eth2
cfgint(v4-defaultroute-mtu)
cfgbool(v4-conncheck-enable)
cfgbool(v4-defaultroute-replace)
cfgint(v4-conncheck-delay)
cfg(cmd-ip)
[root@localhost clatd]#

Whether this is correct. How to check whether the process is running

[root@localhost clatd]# ifconfig -a
eth2 Link encap:Ethernet HWaddr B6:09:1B:87:62:99
inet addr:192.170.1.182 Bcast:192.170.1.255 Mask:255.255.255.0
inet6 addr: 3ffe::101/64 Scope:Global
inet6 addr: fe80::b409:1bff:fe87:6299/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8475038 errors:0 dropped:0 overruns:0 frame:0
TX packets:8592595 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:553588243 (527.9 MiB) TX bytes:632604776 (603.2 MiB)
Interrupt:17 Base address:0xa000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:81435 errors:0 dropped:0 overruns:0 frame:0
TX packets:81435 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:43692915 (41.6 MiB) TX bytes:43692915 (41.6 MiB)

This is my IP config details.

Thanks,
Jaseer

Hi,

Now Resolved the previous issue.

Now Facing the below issue

[root@localhost etc]# clatd
Configuration successfully read, dumping it:
clat-dev=eth2
clat-v4-addr=192.170.1.182
clat-v6-addr=3ffe::101
cmd-ip=ip
cmd-ip6tables=ip6tables
cmd-tayga=tayga
debug=2
dns64-servers=2ffe::10.102.218.110
forwarding-enable=1
ip6tables-enable=
plat-dev=
plat-prefix=2ffe::/96
proxynd-enable=1
quiet=0
script-down=
script-up=
tayga-conffile=
tayga-v4-addr=192.0.0.2
v4-conncheck-delay=10
v4-conncheck-enable=1
v4-defaultroute-advmss=0
v4-defaultroute-enable=1
v4-defaultroute-metric=2048
v4-defaultroute-mtu=1260
v4-defaultroute-replace=0
Starting clatd v1.4 by Tore Anderson tore@fud.no
Using PLAT (NAT64) prefix: 2ffe::/96
get_plat_dev(): finding which network dev faces the PLAT
cfg(plat-prefix)
cfg(cmd-ip)
get_plat_dev(): Found PLAT-facing device: eth2
Device facing the PLAT: eth2
Using CLAT IPv4 address: 192.170.1.182
Using CLAT IPv6 address: 3ffe::101
cfgint(v4-defaultroute-mtu)
cfgbool(v4-conncheck-enable)
cfgbool(v4-defaultroute-replace)
cfgint(v4-conncheck-delay)
Checking if this system already has IPv4 connectivity in 10 sec(s)
cfg(cmd-ip)
cfg(tayga-conffile)
Using temporary conffile for TAYGA: /tmp/UwODoqsEBi
cfg(clat-dev)
cfg(plat-prefix)
cfg(tayga-v4-addr)
cfg(clat-v4-addr)
cfg(clat-v6-addr)
cfgbool(forwarding-enable)
Reading sysctl /proc/sys/net/ipv6/conf/all/forwarding
/proc/sys/net/ipv6/conf/all/forwarding is set to '0'
Enabling IPv6 forwarding
Reading sysctl /proc/sys/net/ipv6/conf/default/accept_ra
/proc/sys/net/ipv6/conf/default/accept_ra is set to '1'
Changing /proc/sys/net/ipv6/conf/default/accept_ra from 1 to 2 to prevent connectivity loss after enabling IPv6 forwarding
Setting sysctl /proc/sys/net/ipv6/conf/default/accept_ra=2
Reading sysctl /proc/sys/net/ipv6/conf/eth2/accept_ra
/proc/sys/net/ipv6/conf/eth2/accept_ra is set to '1'
Changing /proc/sys/net/ipv6/conf/eth2/accept_ra from 1 to 2 to prevent connectivity loss after enabling IPv6 forwarding
Setting sysctl /proc/sys/net/ipv6/conf/eth2/accept_ra=2
Reading sysctl /proc/sys/net/ipv6/conf/lo/accept_ra
/proc/sys/net/ipv6/conf/lo/accept_ra is set to '1'
Changing /proc/sys/net/ipv6/conf/lo/accept_ra from 1 to 2 to prevent connectivity loss after enabling IPv6 forwarding
Setting sysctl /proc/sys/net/ipv6/conf/lo/accept_ra=2
Setting sysctl /proc/sys/net/ipv6/conf/all/forwarding=1
cfgbool(ip6tables-enable)
cfgbool(proxynd-enable)
cfg(plat-dev)
cfg(clat-v6-addr)
Enabling Proxy-ND for 3ffe::101 on eth2
Reading sysctl /proc/sys/net/ipv6/conf/eth2/proxy_ndp
/proc/sys/net/ipv6/conf/eth2/proxy_ndp is set to '0'
Setting sysctl /proc/sys/net/ipv6/conf/eth2/proxy_ndp=1
Enabled Proxy-ND sysctl for eth2
cfg(cmd-ip)
cfg(clat-v6-addr)
cfg(plat-dev)
cmd(ip -6 neighbour add proxy 3ffe::101 dev eth2)
cfg(clat-dev)
Creating and configuring up CLAT device 'eth2'
cfg(cmd-tayga)
cfg(tayga-conffile)
cfgint(debug)
cmd(tayga --config /tmp/UwODoqsEBi --mktun -d)
Unable to attach tun device eth2, aborting: Invalid argument
cmd(tayga --config /tmp/UwODoqsEBi --mktun -d) returned 0
cfg(tayga-conffile)
Cleanup: Deleting TAYGA config file '/tmp/UwODoqsEBi'
cfg(tayga-conffile)
Cleanup: Resetting forwarding sysctl to 0
Setting sysctl /proc/sys/net/ipv6/conf/all/forwarding=0
Cleanup: Resetting /proc/sys/net/ipv6/conf/default/accept_ra to 1
Setting sysctl /proc/sys/net/ipv6/conf/default/accept_ra=1
Cleanup: Resetting /proc/sys/net/ipv6/conf/eth2/accept_ra to 1
Setting sysctl /proc/sys/net/ipv6/conf/eth2/accept_ra=1
Cleanup: Resetting /proc/sys/net/ipv6/conf/lo/accept_ra to 1
Setting sysctl /proc/sys/net/ipv6/conf/lo/accept_ra=1
Cleanup: Resetting proxy_ndp sysctl to 0
cfg(plat-dev)
Setting sysctl /proc/sys/net/ipv6/conf/eth2/proxy_ndp=0
cfg(clat-v6-addr)
cfg(plat-dev)
Cleanup: Removing Proxy-ND entry for 3ffe::101on eth2
cfg(cmd-ip)
cfg(clat-v6-addr)
cfg(plat-dev)
cmd(ip -6 neighbour delete proxy 3ffe::101 dev eth2)
[root@localhost etc]#

Below is the IP address details

[root@localhost etc]# ifconfig -a
eth2 Link encap:Ethernet HWaddr B6:09:1B:87:62:99
inet6 addr: 3ffe::101/64 Scope:Global
inet6 addr: fe80::b409:1bff:fe87:6299/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8484298 errors:0 dropped:0 overruns:0 frame:0
TX packets:8599398 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:554305911 (528.6 MiB) TX bytes:633742405 (604.3 MiB)
Interrupt:17 Base address:0xa000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:81441 errors:0 dropped:0 overruns:0 frame:0
TX packets:81441 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:43693635 (41.6 MiB) TX bytes:43693635 (41.6 MiB)

[root@localhost etc]#

Please let me know the below error is seen and how to resolve it
"Unable to attach tun device eth2, aborting: Invalid argument
cmd(tayga --config /tmp/UwODoqsEBi --mktun -d) returned 0"

Thanks,
Jaseer

clat-dev=eth2 is wrong. clat-dev is a virtual interface clatd will create, it's not meant to be set to any pre-existing device name. So remove that line from your configuration file and try again?

Yeah Thanks, i have made that change and it worked. One more query. I'm Testing SIP call. When the packet leaves the Client(after clatd processing NAT46) Layer 7 header i.e, SIP headers i still see IPV4 address whereas in layer 4 i see IPV6 address. So whether this tool will not change the IP address inside SIP header?

This tool, or more specifically the SIIT algorithm, only works on layer 3. On the IP header, that is. Payload at layer 4 and above is not touched at all (except for layer 4 checksums being recomputed).

Thus if you want to use it with application protocols that embed IP literals, you'll need to use double translation, for example:

[SIP client]--(IPv4)--[clatd#1]-----(IPv6)-----[clatd#2]--(IPv4)--[SIP server]

This way, both the SIP client and the SIP server only see IPv4 packets and addresses, remaining blissfully ignorant that the packet was transported across an IPv6 network in the middle.