05-01-2014
IPv6 address block assign/associate with an interface
Hello all,
I am trying to receive (tcp/udp/sctp) traffic from all IPs and, eventually, all ports of an IPv6 address block using as few sockets as possible short of implementing my own network stack.
One possible solution was to associate an IP block to an interface then bind to that interface, hence the question. I am open to other suggestions as well.
I know already that:
- it can be done by adding each IP individually to the interface via 'ip add' or in code using the IF API.
and, not necessarily regarding the question that:
- restrict bind to an interface via ioctl
- bind to ANY IP to 1 PORT
The problem with first approach is that it is not scalable.
Thanks
10 More Discussions You Might Find Interesting
1. Programming
I know there is a function inet_tpon for unix platforms to validate ipv6 addresses.But i need an equivalent of windows.When i use this function with the header file <winsock2.h> the visual studio 2005 on win2003 issues an error saying identifier not found
:confused: (3 Replies)
Discussion started by: guru13
3 Replies
2. Solaris
I m having interface ce0 ce1 and its sub interfaces for that.
I want to give MAC addresses for the same.
How will I assign it.
Please give solution for the same (4 Replies)
Discussion started by: sunray
4 Replies
3. IP Networking
Hi ,
by default the physical interface (eth1) and virtual interface eth1:0 will be having same mac address, is there any way we can assign separate mac addresses for both the interfaces.
would some one help me out in this.
Thanks
Gopi (1 Reply)
Discussion started by: Gopi Krishna P
1 Replies
4. Solaris
Hi,
inspired by this article, I decided to implement IPMP + IPv6 in Solaris 10.
It worked for me only this way:
1. Setup
# cat /etc/hostname*
10.23.10.113/24 broadcast + group data failover up <- hostname.e1000g0
0.0.0.0/24 broadcast + group data -failover deprecated up standby... (3 Replies)
Discussion started by: masloff
3 Replies
5. Solaris
Hi, anyone has had experience in a static setting an IPv6 interface?, I'm trying accordance with the admin guide (ipv6 network configuration tasks), configure one interface in the server, actually i can do ping to my default gateway and access the Internet in IPv6, the specific point is however,... (3 Replies)
Discussion started by: pabloluja
3 Replies
6. BSD
Hi,
Am using FreeBSD7.4/i386
During IPv6 configuration, I added the following in rc.conf as
Restarted IPv6 network using /etc/rc.d/network_ipv6 restart..
My problem is I need to set link local IPv6 address auto-configured..
Is my proceeding right??
I feel something missing to make... (0 Replies)
Discussion started by: Priya Amaresh
0 Replies
7. Shell Programming and Scripting
Hi All,
Would anyone know how to modify the below, so only the IPv6 address (red) is printed, please?
(in other words, what's between inet6 and the / sign)
ipv6=`/sbin/ifconfig lo0:5 inet6 | grep 'inet6'`
print $ipv6
Currently the output of the above script is:
inet6... (7 Replies)
Discussion started by: chatguy
7 Replies
8. UNIX for Advanced & Expert Users
Hi ,
Could someone let me know how to detect duplicate ip address after assigning ip address to ethernet interface using c program (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have created a bonding bond1 interface with 6 Eth , mode=4. Recently i have changed my old ipv6 to new one and tried to restart as well as reload network service. Post which i can see old as well as changed ipv6 in ifconfig command output. Below are few files and command output for your... (1 Reply)
Discussion started by: omkar.jadhav
1 Replies
10. Solaris
Hello dears
how to assign IPv4 and IPv6 addresses with same interface on solaris 10 (1 Reply)
Discussion started by: ttashman
1 Replies
LEARN ABOUT SUSE
tnm::udp
udp(n) Tnm Tcl Extension udp(n)
__________________________________________________________________________________________________________________________________________________
NAME
udp - Send and receive UDP datagrams.
_________________________________________________________________
DESCRIPTION
The udp command allows to send and receive datagrams using the User Datagram Protocol (UDP) (RFC 768).
UDP COMMAND
udp open [port]
The udp open command opens a UDP datagram socket and returns an udp handle. The socket is bound to given port number or name. An
unused port number is used if the port argument is missing.
udp connect host port
The udp connect command opens a UDP datagram socket and connects it to a port on a remote host. A connected UDP socket only allows
to send messages to a single destination. This usually allows to shorten the code since there is no need to specify the destination
address for each udp send command on a connected UDP socket. The command returns a udp handle.
udp send handle [host port] message
The udp send command sends a datagram containing message to the destination specified by host and port. The host and port arguments
may not be used if the UDP handle is already connected to a transport endpoint. If the UDP handle is not connected, you must use
these optional arguments to specify the destination of the datagram.
udp receive handle
The udp receive command receives a datagram from the UDP socket associated with handle. This command blocks until a datagram is
ready to be received. In most cases, it might be a good idea to check for pending datagrams using the udp bind command.
udp close handle
The udp close command closes the UDP socket associated with handle.
udp bind handle readable [script]
udp bind handle writable [script]
The udp bind command allows to bind scripts to a UDP handle. A script is evaluated once the UDP handle becomes either readable or
writable, depending on the third argument of the udp bind command. The script currently bound to a UDP handle can be retrieved by
calling the udp bind command without a script argument. Bindings are removed by binding an empty string.
udp info [handle]
The udp info command without the handle argument returns a list of all existing UDP handles. Information about the state of a UDP
handle can be obtained by supplying a valid UDP handle. The result is a list containing the source IP address, the source port, the
destination IP address and the destination port.
SEE ALSO
scotty(1), Tnm(n), Tcl(n)
AUTHORS
Juergen Schoenwaelder <schoenw@cs.utwente.nl>
Tnm udp(n)