Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I'm able to create the TAP interface, lets say with name 'test', and bring it up, but when I try deleting it using ioctl(fd, TUNSETPERSIST, 0) I can see ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2009
    Posts
    6

    Deleting TAP interface


    Hi,

    I'm able to create the TAP interface, lets say with name 'test', and bring it up, but when I try deleting it using

    ioctl(fd, TUNSETPERSIST, 0)

    I can see that on my system I still have an interafce with name eth0 (the original name was test). How can I completely delete the interface that I created and restore the system to the state it was before I created the TAP interface?

    Thanks.

  2. #2
    Just Joined!
    Join Date
    May 2009
    Posts
    3
    hi,

    Do use tunctl to delete the device created. tunctl is available in xml-utilities pacakge.

    use tunctl -d tap0 to delete the tap0. before deleting the device, bring it down using ifconfig tap0 down.

    Then bring down the eth0 interface and run dhclient to get the IP address.

    ifconfig eth0 down
    dhclient eth0

    hope it helps

    alan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •