Server Network Utility - Default Ports

  • SQL Server 2000 Enterprise Edition.

    I have six Instances on this server. I am going to try and setup "C" names for all Instances.

    I am wondering if this will work.

    Question:

    1. Any experiences ?

    2. In the Server Network Unility, each Instances has a default port for TCP/IP. Will these ports ever change ? (after a reboot for example). Or will they stay the same number always ?

  • Same unless you change.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • Agree, should be the same (for sockets).

    Steve Jones

    steve@dkranch.net

  • is there an "active" server in this ?

    one server that directs all port traffic for all Instances ?

  • The operating system will open up ports for listening, just like you can open up multiple ports for say IIS. The various instances know to listen on those particular ports. This is a function of the OS, not SQL Server.

    K. Brian Kelley

    bkelley@sqlservercentral.com

    http://qa.sqlservercentral.com/columnists/bkelley/

    K. Brian Kelley
    @kbriankelley

  • "Port Assignment: Active Server acts as a listener and keeps track of all other Instances running on the system."

    - Microsoft

  • This doesn't serve as a redirector. It keeps track of the ports each instance is running on. A client can communicate via UDP to port 1434 to retrieve a list of instances and ports. From Books Online:

    quote:


    When the SQL Server 2000 client Net-Libraries connect to an instance of SQL Server 2000, only the network name of the computer running the instance and the instance name are required. When an application requests a connection to a remote computer, Dbnetlib.dll opens a connection to UDP port 1434 on the computer network name specified in the connection. All computers running an instance of SQL Server 2000 listen on this port. When a client Dbnetlib.dll connects to this port, the server returns a packet listing all the instances running on the server. For each instance, the packet reports the server Net-Libraries and network addresses the instance is listening on. After the Dbnetlib.dll on the application computer receives this packet, it chooses a Net-Library that is enabled on both the application computer and on the instance of SQL Server, and makes a connection to the address listed for that Net-Library in the packet.


    Hope that helps.

    K. Brian Kelley

    bkelley@sqlservercentral.com

    http://qa.sqlservercentral.com/columnists/bkelley/

    K. Brian Kelley
    @kbriankelley

  • 1434 ???

    Our Client Network Utilitiy --> TCP/IP (1433)

    Server Network Utilitiy --> Default Instance (1433), Instance1 (1113), etc...

    1434 is not there anywhere ?

    Also what is UDP ?

  • Also, from BOL:

    Net-Library:

    TCP/IP Sockets

    Default instance network address:

    TCP Port 1433

    Named instance network address:

    A TCP port is chosen dynamically the first time the MSSQL$instancename service is started.

    where does 1434 exist ?

  • UDP - User Datagram Protocol. Sits on the same layer of the OSI model as TCP but serves a different role.

    It's used for connectionless transport. Low overhead, so it's quicker than TCP, as it doesn't require the connection handshake (which means the client and server have to talk back and forth in several passes to establish HOW they will talk to each other... whereas UDP skips that initial talking all together). However, there is no guarantee of delivery and there isn't error checking within UDP as with a TCP connection. As a result, these two functions have to be carried out by a higher layer protocol. WINS name resolution works on UDP as well.

    Clients will make the actual connection to a SQL Server via TCP because it is connection-oriented if the client is using the TCP/IP NetLib. However, when a client system is talking to a server running SQL Server, it's going to inquire about how to make that connection. That's where UDP and port 1434 comes in. Consider the following analogy.

    There's a restaurant you've heard a lot of great things about and you want to try it. You don't recognize the street address in the phone book, but you have the phone number. So you give the restaurant a call and ask for directions. That's the UDP port 1434 part.

    The person on the other line knows several ways to get there and gives you your choice. That's the different network libraries part.

    You choose to go one particular route and get to the restaurant just fine. That's choosing TCP/IP on port 1433 from the application, as opposed to say Named Pipes or IPX/SPX (if you're running it).

    Hopefully that clarifies things.

    K. Brian Kelley

    bkelley@sqlservercentral.com

    http://qa.sqlservercentral.com/columnists/bkelley/

    K. Brian Kelley
    @kbriankelley

  • understood.

    where is UDP "1434" configured ?

  • Ok. This is what I am trying to do.

    I want to setup C Names (common names) for my development SQL Server 2000 box. This is what I have setup.

    6 Instances:

    Default

    Inst1

    Inst2

    Inst3

    Inst4

    Inst5

    On the Server Network Utility I am going to change the default port for each Instance to ports I have picked. Ports that are not in the services file(winnt\system32\drivers\etc).

    C Names:

    SQLDEV01 --> Default

    SQLTST01 --> Inst1

    SQLUAT01 --> Inst2

    ...

    So I would give Clients the C Name ONLY.

    In DNS:

    I will put the C Names and it will redirect to a specific Instance Name AND a port.

    My questions are:

    1. Has anyone done this before ?

    2. Can you specify an IP and Port in DNS ?

    ***Benefits of this:***

    1. Clients DO NOT know our sql server names

    2. If we want to move a database, ONLY have to change the DNS entry. DO NOT have to change the Application connect string.

  • You can't specify which port the listener is on, so far as I am aware. There may be an undocumented registry hack, but there isn't anything with the normal set of tools. It is what is reserved for SQL Server by IANA (just as 1433 is the official TCP socket for SQL Server).

    DNS typically deals with IP addresses only. In Windows 2000 DNS, there isn't an option to specify a port. I believe the same is true of BIND.

    Though I've not tried it, SQL Server does have some support for Proxy Server to do this sort of thing. You might check out Books Online to see if that'll work for you.

    K. Brian Kelley

    bkelley@sqlservercentral.com

    http://qa.sqlservercentral.com/columnists/bkelley/

    K. Brian Kelley
    @kbriankelley

  • Brian is correct, DNS has nothing to do with Ports. DNS is a name resolution srevice. It gives back an IP for a name (and vice versa). You can specify the service type in some versions (like MX for mail), but this has nothing to do with ports.

    Steve Jones

    steve@dkranch.net

  • OK, Time for another network jihad or not.

    Actually, there is a new record type called SRV. You can read the full details in RFC2782 (http://www.jhsoft.com/rfc/rfc2782.txt). This record type is used in connection with different directory servers such as LDAP and Windows 2000 directory services. This record type is however still considered experimental, and is NOT supported by most programs in use today, including web browsers.

    Not sure it SQL Server client network libraries support this feature. I will post the answer if I come across it.

Viewing 15 posts - 1 through 15 (of 18 total)

You must be logged in to reply to this topic. Login to reply