SQL Server Browser

  • Good question - It helps if you read the question before answering.

  • Trey Staker (7/12/2011)


    Thanks for the question. I learned a lot not only from the question but especially from the discussion. I did't know what IP_ANY was.

    Oh, great! So, you mean that now you know what it is.

    Care to explain it to me? 😛

    -- Gianluca Sartori

  • mtassin (7/12/2011)


    Trey Staker (7/12/2011)


    Thanks for the question. I learned a lot not only from the question but especially from the discussion. I did't know what IP_ANY was.

    I'm beginning to think that I still don't.

    Up until today I thought it was IP (Internet Protocal) _ANY. IP is an address 192.168.0.1

    PORTS are either TCP or UDP ports and are services operating on top of IP.

    Or at least that's what I thought, now I think I want to go back to IPX/SPX or Banyan vines or something.

    What makes you think it's not? A poorly worded BOL page?

    This is the BOL page we've been discussing:

    http://msdn.microsoft.com/en-us/library/ms181087.aspx

    Let's break this down:

    "Upon startup, SQL Server Browser starts and claims UDP port 1434. SQL Server Browser reads the registry, identifies all instances of SQL Server on the computer, and notes the ports and named pipes that they use. When a server has two or more network cards, SQL Server Browser returns the first enabled port it encounters for SQL Server. SQL Server Browser support ipv6 and ipv4.

    When SQL Server clients request SQL Server resources, the client network library sends a UDP message to the server using port 1434. SQL Server Browser responds with the TCP/IP port or named pipe of the requested instance. The network library on the client application then completes the connection by sending a request to the server using the port or named pipe of the desired instance."

    This is it in a nutshell.

    A little later it says this:

    "SQL Server Browser is not a clustered resource and does not support failover from one cluster node to the other. Therefore, in the case of a cluster, SQL Server Browser should be installed and turned on for each node of the cluster. On clusters, SQL Server Browser listens on IP_ANY.

    Note

    When listening on IP_ANY, when you enable listening on specific IPs, the user must configure the same TCP port on each IP, because SQL Server Browser returns the first IP/port pair that it encounters."

    This means two things:

    1) you must run SQL Server Browser on both nodes at once, as it doesn't fail over.

    2) When you lock down specific IPs for an instance, you need to make sure that you specify the port on all server IP addresses for that instance to prevent the browser from returning an IP that does not have the port on it.

    Simple. The port is always 1434, but with IP_ANY you have to be careful with making sure that the instance port is properly associated with all IP addresses when you lock one down.

  • SanDroid (7/12/2011)


    jeff.mason (7/12/2011)


    IP_ANY is JUST an address!

    IP_ANY just tells the system to use all IP addresses. It specifies nothing about the port.

    As was already pointed out today by someone else earlier IP_ANY is much more than just an Address or a Port.....

    http://msdn.microsoft.com/en-us/library/ms191220.aspx

    By default, TCP connections use the TSQL Default TCP endpoint. If a new (user-defined) TCP endpoint is created for a specific TCP port, connections to that TCP port will connect to that new endpoint. If a new TCP/TSQL endpoint is created using IP_ANY as the port, then TCP connections will connect to that new endpoint.

    ...

    2.If there is not an exact match, the TCP port is checked against all IP_ANY endpoints, and if the TCP port is listed, that endpoint is used.

    That has to be a typo. Look a paragraph down in the same article:

    "User-defined endpoints behave the same way as default endpoints. When an endpoint is created for an IP address (or all IP addresses, by using IP_ANY) and a specific TCP port, permission to connect to the endpoint is granted to users in a process called provisioning. They retain the provisioning regardless of whether or not the server is actually listening on the IP address/TCP port combination. A connection to an IP address and TCP port is matched to an endpoint in the following order:

    1.If the IP address and TCP port exactly match the IP address and TCP port of an endpoint, the endpoint is used.

    2.If there is not an exact match, the TCP port is checked against all IP_ANY endpoints, and if the TCP port is listed, that endpoint is used.

    3.If there is no exact port match, the default TCP endpoint is used."

  • jeff.mason (7/12/2011)


    The answer (assuming you mean the DB engine and not SSAS) is ALWAYS UDP 1434. It may listen on UDP 1434 of IP_ANY, but still UDP 1434.

    We are not talking about the answer for just the DB engine. You are correct if you edited the question to say that and not the SQL Browser service.

    We are talking about all connections serviced by the SQL Browser service on a cluster server.

    For them to all work on a cluster server do not set SQL Browser service to a specific IP/Port pair, set SQL Browser service to use IP_ANY.

  • jeff.mason (7/12/2011)


    mtassin (7/12/2011)


    Trey Staker (7/12/2011)


    Thanks for the question. I learned a lot not only from the question but especially from the discussion. I did't know what IP_ANY was.

    I'm beginning to think that I still don't.

    Up until today I thought it was IP (Internet Protocal) _ANY. IP is an address 192.168.0.1

    PORTS are either TCP or UDP ports and are services operating on top of IP.

    Or at least that's what I thought, now I think I want to go back to IPX/SPX or Banyan vines or something.

    What makes you think it's not? A poorly worded BOL page?

    Don't tell me that Microsoft wrote a BOL page wrong? Oh dear... Oh dear...

    I can tell you that from reading that BOL page I'm more confused about TCP/IP than I have been in 10+ years of working with it.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • SanDroid (7/12/2011)


    jeff.mason (7/12/2011)


    The answer (assuming you mean the DB engine and not SSAS) is ALWAYS UDP 1434. It may listen on UDP 1434 of IP_ANY, but still UDP 1434.

    We are not talking about the answer for just the DB engine. You are correct if you edited the question to say that and not the SQL Browser service.

    We are talking about all connections serviced by the SQL Browser service on a cluster server.

    For them to all work on a cluster server do not set SQL Browser service to a specific IP/Port pair, set SQL Browser service to use IP_ANY.

    I think that depends on how you read the question.

    Original Question


    On clusters, the SQL Server Browser listens on which port?

    Is the SQL Server Browser Service listening for inbound connections to a SQL Instance, or is it listening for SQL instances to service outwards?



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • SanDroid (7/12/2011)


    jeff.mason (7/12/2011)


    The answer (assuming you mean the DB engine and not SSAS) is ALWAYS UDP 1434. It may listen on UDP 1434 of IP_ANY, but still UDP 1434.

    We are not talking about the answer for just the DB engine. You are correct if you edited the question to say that and not the SQL Browser service.

    We are talking about all connections serviced by the SQL Browser service on a cluster server.

    For them to all work on a cluster server do not set SQL Browser service to a specific IP/Port pair, set SQL Browser service to use IP_ANY.

    Fine. You just tell me how to configure the SQL Server Browser for the DB engine to listen to any port other than UDP 1434 and I will gladly make the change.

    Translation: You can't change this.

  • mtassin (7/12/2011)


    SanDroid (7/12/2011)


    jeff.mason (7/12/2011)


    The answer (assuming you mean the DB engine and not SSAS) is ALWAYS UDP 1434. It may listen on UDP 1434 of IP_ANY, but still UDP 1434.

    We are not talking about the answer for just the DB engine. You are correct if you edited the question to say that and not the SQL Browser service.

    We are talking about all connections serviced by the SQL Browser service on a cluster server.

    For them to all work on a cluster server do not set SQL Browser service to a specific IP/Port pair, set SQL Browser service to use IP_ANY.

    I think that depends on how you read the question.

    Original Question


    On clusters, the SQL Server Browser listens on which port?

    Is the SQL Server Browser Service listening for inbound connections to a SQL Instance, or is it listening for SQL instances to service outwards?

    The SQL Server Browser doesn't "listen" for SQL instances on any port. Per the quoted BOL page:

    "Upon startup, SQL Server Browser starts and claims UDP port 1434. SQL Server Browser reads the registry, identifies all instances of SQL Server on the computer, and notes the ports and named pipes that they use. When a server has two or more network cards, SQL Server Browser returns the first enabled port it encounters for SQL Server."

    It does this whether clustered or not. The only gotcha is that last part on a cluster, which is why the IP_ANY blurb was needed. If you enable a port for a particular IP you should do it across all IPs as well as a result.

  • jeff.mason (7/12/2011)


    ...A little later it says this:

    "SQL Server Browser is not a clustered resource and does not support failover from one cluster node to the other. Therefore, in the case of a cluster, SQL Server Browser should be installed and turned on for each node of the cluster. On clusters, SQL Server Browser listens on IP_ANY.

    Note

    When listening on IP_ANY, when you enable listening on specific IPs, the user must configure the same TCP port on each IP, because SQL Server Browser returns the first IP/port pair that it encounters."

    ...

    So after all that research and posting and re-posting....

    What answer to the question about configuring SQL Browser Service on a cluster fits the best? 1433, 1434, or IP_ANY?

  • SanDroid (7/12/2011)


    So after all that research and posting and re-posting....

    What answer to the question about configuring SQL Browser Service on a cluster fits the best? 1433, 1434, or IP_ANY?

    None, I guess, as you can't configure it.

    -- Gianluca Sartori

  • SanDroid (7/12/2011)


    jeff.mason (7/12/2011)


    ...A little later it says this:

    "SQL Server Browser is not a clustered resource and does not support failover from one cluster node to the other. Therefore, in the case of a cluster, SQL Server Browser should be installed and turned on for each node of the cluster. On clusters, SQL Server Browser listens on IP_ANY.

    Note

    When listening on IP_ANY, when you enable listening on specific IPs, the user must configure the same TCP port on each IP, because SQL Server Browser returns the first IP/port pair that it encounters."

    ...

    So after all that research and posting and re-posting....

    What answer to the question about configuring SQL Browser Service on a cluster fits the best? 1433, 1434, or IP_ANY?

    "SQL Server Browser listens on IP_ANY" -- this means it listens across all IP addresses. It says nothing about ports. You can listen on an address and on a port both, which is I believe the original confusion and why I think that the answer is wrong. The writer saw this and assumed it meant "listen on port" when it really meant "listen on address".

    Again, I ask you -- if you were to change the browser to another port, or to "IP_ANY" (if that were possible which it isn't), where would you do it? Can you provide instructions to change the port for the browser to another port? And then to change the clients to know that the browser isn't on UDP 1434 like it is expecting?

  • mtassin (7/12/2011)


    Don't tell me that Microsoft wrote a BOL page wrong? Oh dear... Oh dear...

    I can tell you that from reading that BOL page I'm more confused about TCP/IP than I have been in 10+ years of working with it.

    LOL... I have not read many M$ KB or BOL pages that made others more confused. I think the ones one Routeable RAS or M$ Proxy server 2 had to be the worst.

  • Gianluca Sartori (7/12/2011)


    SanDroid (7/12/2011)


    So after all that research and posting and re-posting....

    What answer to the question about configuring SQL Browser Service on a cluster fits the best? 1433, 1434, or IP_ANY?

    None, I guess, as you can't configure it.

    So true... 😉

  • jeff.mason (7/12/2011)


    Again, I ask you -- if you were to change the browser to another port, or to "IP_ANY" (if that were possible which it isn't), where would you do it? Can you provide instructions to change the port for the browser to another port? And then to change the clients to know that the browser isn't on UDP 1434 like it is expecting?

    And here I think is the rub. I'm logged into my SQL 2008 R2 clustered server looking for where I can configure IP_ANY vs an IP Address for the SQL Server Browser Service.

    go into SQL Server configuration Manager and go to Service to configure the service

    I have

    Binary Path

    Error Control

    Exit Code

    Host Name

    Name

    Process ID

    SQL Service type

    Start Mode

    State

    then go to advanced to configure the browser service.

    All I have is

    Active

    Clustered

    Customer Feedback reporting

    Dump Directory

    Error Reporting

    Instance ID

    Running under 64 bit OS

    Unlike SQL I can't apparently configure it's port.

    I can go to the SQL Server Network configuration and fiddle with ports for the MSSQLSERVER service, but I still can't change anything for the browser.

    So since I'm on a cluster, let's look at cluster configuration.

    Wait a sec, Browser isn't cluster aware, and I can't configure it there either.

    Ok where do I specify IP_ANY anyway?



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

Viewing 15 posts - 31 through 45 (of 60 total)

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