Thanks Dave. I have tried this but getting the following error. Any idea how to fix this?
vpp# create tap host-if-name abc create tap: open '/dev/vhost-net': Operation not permitted ubuntu@vpp4:~$ ls -ltr /dev/vhost-net crwxrwxrwx 1 root root 10, 238 Nov 26 04:33 /dev/vhost-net Also one more thing, in your set up of home gateway, how the host OS is redirecting the packet to VPP back? how are you importing the VPP routes to host OS? Thanks Vyshakh On Tue, Nov 26, 2019 at 3:56 AM Dave Barach (dbarach) <dbar...@cisco.com> wrote: > Try something like this: > > > > create tap host-if-name lstack host-ip4-addr 192.168.2.2/24 host-ip4-gw > 192.168.2.1 > > set int ip address tap0 <vpp address on the 192.168.2.X/24 subnet> # vpp > interface in L3 mode > > or > > set int l2 bridge tap0 1 # vpp interface in L2 mode. > > > > I use the latter setup in production on my vpp home gateway. > > > > HTH... Dave > > > > *From:* vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> *On Behalf Of *vyshakh > krishnan > *Sent:* Monday, November 25, 2019 1:29 PM > *To:* vpp-dev@lists.fd.io > *Subject:* [vpp-dev] tuntap interface in VPP > > > > Hi, > > > > Our requirement was to redirect the telnet packets to host OS from VPP so > that the kernel stack can reply to the telnet packet. And found that tuntap > interface in VPP is perfect for this. > > > > I was able create tuntap interface using: > > > > vpp# tap connect newtap > tapcli-0 > vpp# show in > inacl interface > vpp# show interface > Name Idx State MTU (L3/IP4/IP6/MPLS) > Counter Count > local0 0 down 0/0/0/0 > memif0/0 1 up 9000/0/0/0 rx > packets 161 > rx > bytes 9096 > tx > packets 499 > tx > bytes 31437 > drops > 945 > > tx-error 785 > tapcli-0 2 down 9000/0/0/0 drops > 8 > > > > which created the following in host: > > > > newtap: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 > inet6 fe80::cc6c:feff:feed:ff11 prefixlen 64 scopeid 0x20<link> > ether ce:6c:fe:ed:ff:11 txqueuelen 1000 (Ethernet) > RX packets 0 bytes 0 (0.0 B) > RX errors 0 dropped 0 overruns 0 frame 0 > TX packets 7 bytes 586 (586.0 B) > TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 > > > > Can anyone please help me with the following questions: > > > > 1. How will we assign an IP to this host interface (newtap). Is there a > way to do this from VPP (set int ip addr tapcli-0 192.168.3.1/24 --> > assigns IP only to VPP interface.) > > > > 2. How will host OS reply to the packets? Routing entries are known only > to VPP. is there a way to export these to host OS networking stack from > VPP? > > > > Thanks > > Vyshakh > > > -- --Regards Vyshakh Krishnan C H
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14697): https://lists.fd.io/g/vpp-dev/message/14697 Mute This Topic: https://lists.fd.io/mt/61945630/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-